forked from seung-gyu-kim/LikeLion_GASILI_Project
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'dev' of https://github.com/airaen0129/LikeLion_GASILI_P…
…roject into dev
- Loading branch information
Showing
15 changed files
with
90 additions
and
26 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
from django.contrib import admin | ||
|
||
# Register your models here. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
from django.apps import AppConfig | ||
|
||
|
||
class MypageConfig(AppConfig): | ||
name = 'mypage' |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
from django.db import models | ||
|
||
# Create your models here. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
{% extends 'base.html' %} | ||
|
||
{% block content %} | ||
<div class="container-fluid row" style="width:100%; margin:0; padding:0;"> | ||
<div class="containerleft"> | ||
</div> | ||
<div class="containerbody"> | ||
<div class="container" style="margin:0,25px,25px,25px; width:100%;"> | ||
<section id="recently"> | ||
<div class="col"> | ||
<div class="row"> | ||
<div style="border-radius: 5px; border:1px dashed rgb(91,155,213); width:100%; "> | ||
<h1 style="text-align: center;">Mypage!</h1> | ||
<div style="padding-top: 50px;"></div> | ||
<div class="flexbox"> | ||
<div class="item">내가 쓴 게시글</div> | ||
<div class="item">내가 단 댓글</div> | ||
<div class="item">사용자정보</div> | ||
</div> | ||
<div style="padding-top: 150px;"> | ||
<table class="table table-hover"> | ||
<thead> | ||
<tr style="text-align: center;"> | ||
<th scope="col">순번</th> | ||
<th scope="col">글제목</th> | ||
<th scope="col">작성자</th> | ||
<th scope="col">작성일자</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
{% for post in posts %} | ||
<tr onclick="location.href='{% url 'test' post.id %}'" style="text-align: center;"> | ||
<th scope="row">{{post.id}}</th> | ||
<td>{{post.title}}</td> | ||
<td>{{post.userName}}</td> | ||
<td>{{post.date}}</td> | ||
</tr> | ||
|
||
{%endfor%} | ||
</tbody> | ||
</table> | ||
|
||
</div> | ||
</div> | ||
</div> | ||
</section> | ||
</div> | ||
</div> | ||
<div class="containerright"></div> | ||
</div> | ||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
from django.test import TestCase | ||
|
||
# Create your tests here. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
from django.urls import path | ||
from . import views | ||
|
||
urlpatterns = [ | ||
path('mypage/', views.mypage, name='mypage'), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
from django.shortcuts import render, redirect | ||
from board.models import Board | ||
|
||
# Create your views here. | ||
def mypage(request): | ||
if request.user.is_authenticated: | ||
posts = Board.objects.filter(userId = request.user.id) | ||
return render(request, 'mypage/mypage.html', {'posts': posts}) | ||
else: | ||
return redirect('login') |