diff --git a/blog/__pycache__/__init__.cpython-37.pyc b/blog/__pycache__/__init__.cpython-37.pyc new file mode 100644 index 0000000..4c4b11c Binary files /dev/null and b/blog/__pycache__/__init__.cpython-37.pyc differ diff --git a/blog/__pycache__/admin.cpython-37.pyc b/blog/__pycache__/admin.cpython-37.pyc new file mode 100644 index 0000000..4eaf3fd Binary files /dev/null and b/blog/__pycache__/admin.cpython-37.pyc differ diff --git a/blog/__pycache__/models.cpython-37.pyc b/blog/__pycache__/models.cpython-37.pyc new file mode 100644 index 0000000..cb5de30 Binary files /dev/null and b/blog/__pycache__/models.cpython-37.pyc differ diff --git a/blog/__pycache__/urls.cpython-37.pyc b/blog/__pycache__/urls.cpython-37.pyc new file mode 100644 index 0000000..4ced1a7 Binary files /dev/null and b/blog/__pycache__/urls.cpython-37.pyc differ diff --git a/blog/__pycache__/views.cpython-37.pyc b/blog/__pycache__/views.cpython-37.pyc new file mode 100644 index 0000000..e6b9a66 Binary files /dev/null and b/blog/__pycache__/views.cpython-37.pyc differ diff --git a/blog/migrations/__pycache__/0001_initial.cpython-37.pyc b/blog/migrations/__pycache__/0001_initial.cpython-37.pyc new file mode 100644 index 0000000..0e7e6ea Binary files /dev/null and b/blog/migrations/__pycache__/0001_initial.cpython-37.pyc differ diff --git a/blog/migrations/__pycache__/0002_blog_author.cpython-37.pyc b/blog/migrations/__pycache__/0002_blog_author.cpython-37.pyc new file mode 100644 index 0000000..1e69d5b Binary files /dev/null and b/blog/migrations/__pycache__/0002_blog_author.cpython-37.pyc differ diff --git a/blog/migrations/__pycache__/__init__.cpython-37.pyc b/blog/migrations/__pycache__/__init__.cpython-37.pyc new file mode 100644 index 0000000..287baad Binary files /dev/null and b/blog/migrations/__pycache__/__init__.cpython-37.pyc differ diff --git a/blog/templates/base.html b/blog/templates/base.html index ceab4c4..edca00c 100644 --- a/blog/templates/base.html +++ b/blog/templates/base.html @@ -1,12 +1,21 @@ -
- -
+ + + + + + Document + - -
- {% block content %} - {% endblock %} -
-
- \ No newline at end of file +
+ +
+ + +
+ {% block content %} + {% endblock %} +
+
+ + diff --git a/blog/templates/detail.html b/blog/templates/detail.html index 37f2593..3860171 100644 --- a/blog/templates/detail.html +++ b/blog/templates/detail.html @@ -1,4 +1,4 @@ -{% extends 'base.html '%} +{% extends 'base.html' %} {% block content %} @@ -8,9 +8,11 @@

{{blog.title}}



+ {% csrf_token %} + - + EDIT diff --git a/blog/templates/edit.html b/blog/templates/edit.html index 0f23497..ea460a2 100644 --- a/blog/templates/edit.html +++ b/blog/templates/edit.html @@ -8,7 +8,8 @@

제목:


작성자:

- + +

본문:

diff --git a/blog/templates/home.html b/blog/templates/home.html index f81afa5..62fe36b 100644 --- a/blog/templates/home.html +++ b/blog/templates/home.html @@ -7,7 +7,7 @@ # Title - Date + Date Author diff --git a/blog/views.py b/blog/views.py index 206c336..14b4331 100644 --- a/blog/views.py +++ b/blog/views.py @@ -25,6 +25,7 @@ def create(request): blog = Blog() #객체 틀 하나 가져오기 blog.title = request.GET['title'] #내용채우기 blog.body = request.GET['body'] + blog.author = request.GET['author'] # 작성자를 받아오지 않네요! blog.pub_date = timezone.datetime.now() blog.save() #객체 저장하기 @@ -40,6 +41,7 @@ def update(request, blog_id): blog = get_object_or_404(Blog, pk = blog_id) blog.title = request.GET['title'] #내용채우기 blog.body = request.GET['body'] + blog.author = request.GET['author'] # 여기도 마찬가지! blog.pub_date = timezone.datetime.now() blog.save() #객체 저장하기 diff --git a/blogProject/__pycache__/__init__.cpython-37.pyc b/blogProject/__pycache__/__init__.cpython-37.pyc new file mode 100644 index 0000000..a3c167e Binary files /dev/null and b/blogProject/__pycache__/__init__.cpython-37.pyc differ diff --git a/blogProject/__pycache__/settings.cpython-37.pyc b/blogProject/__pycache__/settings.cpython-37.pyc new file mode 100644 index 0000000..0884efd Binary files /dev/null and b/blogProject/__pycache__/settings.cpython-37.pyc differ diff --git a/blogProject/__pycache__/urls.cpython-37.pyc b/blogProject/__pycache__/urls.cpython-37.pyc new file mode 100644 index 0000000..6d89455 Binary files /dev/null and b/blogProject/__pycache__/urls.cpython-37.pyc differ diff --git a/blogProject/__pycache__/wsgi.cpython-37.pyc b/blogProject/__pycache__/wsgi.cpython-37.pyc new file mode 100644 index 0000000..9a78b5a Binary files /dev/null and b/blogProject/__pycache__/wsgi.cpython-37.pyc differ diff --git a/blogProject/settings.py b/blogProject/settings.py index a345a49..8960128 100644 --- a/blogProject/settings.py +++ b/blogProject/settings.py @@ -1,15 +1,3 @@ -""" -Django settings for blogProject project. - -Generated by 'django-admin startproject' using Django 3.0.6. - -For more information on this file, see -https://docs.djangoproject.com/en/3.0/topics/settings/ - -For the full list of settings and their values, see -https://docs.djangoproject.com/en/3.0/ref/settings/ -""" - import os # Build paths inside the project like this: os.path.join(BASE_DIR, ...) diff --git a/db.sqlite3 b/db.sqlite3 index abffe5d..1d6f66f 100644 Binary files a/db.sqlite3 and b/db.sqlite3 differ diff --git a/myblog/myapp1/__pycache__/__init__.cpython-37.pyc b/myblog/myapp1/__pycache__/__init__.cpython-37.pyc new file mode 100644 index 0000000..1c190e4 Binary files /dev/null and b/myblog/myapp1/__pycache__/__init__.cpython-37.pyc differ diff --git a/myblog/myapp1/__pycache__/admin.cpython-37.pyc b/myblog/myapp1/__pycache__/admin.cpython-37.pyc new file mode 100644 index 0000000..ca9953d Binary files /dev/null and b/myblog/myapp1/__pycache__/admin.cpython-37.pyc differ diff --git a/myblog/myapp1/__pycache__/models.cpython-37.pyc b/myblog/myapp1/__pycache__/models.cpython-37.pyc new file mode 100644 index 0000000..e04a72e Binary files /dev/null and b/myblog/myapp1/__pycache__/models.cpython-37.pyc differ diff --git a/myblog/myapp1/__pycache__/views.cpython-37.pyc b/myblog/myapp1/__pycache__/views.cpython-37.pyc new file mode 100644 index 0000000..7f442cf Binary files /dev/null and b/myblog/myapp1/__pycache__/views.cpython-37.pyc differ diff --git a/myblog/myapp1/migrations/__pycache__/__init__.cpython-37.pyc b/myblog/myapp1/migrations/__pycache__/__init__.cpython-37.pyc new file mode 100644 index 0000000..8144d46 Binary files /dev/null and b/myblog/myapp1/migrations/__pycache__/__init__.cpython-37.pyc differ diff --git a/myblog/myapp2/__pycache__/__init__.cpython-37.pyc b/myblog/myapp2/__pycache__/__init__.cpython-37.pyc new file mode 100644 index 0000000..174187d Binary files /dev/null and b/myblog/myapp2/__pycache__/__init__.cpython-37.pyc differ diff --git a/myblog/myapp2/__pycache__/admin.cpython-37.pyc b/myblog/myapp2/__pycache__/admin.cpython-37.pyc new file mode 100644 index 0000000..6b70f8d Binary files /dev/null and b/myblog/myapp2/__pycache__/admin.cpython-37.pyc differ diff --git a/myblog/myapp2/__pycache__/models.cpython-37.pyc b/myblog/myapp2/__pycache__/models.cpython-37.pyc new file mode 100644 index 0000000..2009e5b Binary files /dev/null and b/myblog/myapp2/__pycache__/models.cpython-37.pyc differ diff --git a/myblog/myapp2/__pycache__/views.cpython-37.pyc b/myblog/myapp2/__pycache__/views.cpython-37.pyc new file mode 100644 index 0000000..b1d74b4 Binary files /dev/null and b/myblog/myapp2/__pycache__/views.cpython-37.pyc differ diff --git a/myblog/myapp2/migrations/__pycache__/__init__.cpython-37.pyc b/myblog/myapp2/migrations/__pycache__/__init__.cpython-37.pyc new file mode 100644 index 0000000..6f16b0c Binary files /dev/null and b/myblog/myapp2/migrations/__pycache__/__init__.cpython-37.pyc differ diff --git a/myblog/myblog/__pycache__/__init__.cpython-37.pyc b/myblog/myblog/__pycache__/__init__.cpython-37.pyc new file mode 100644 index 0000000..56dc356 Binary files /dev/null and b/myblog/myblog/__pycache__/__init__.cpython-37.pyc differ diff --git a/myblog/myblog/__pycache__/settings.cpython-37.pyc b/myblog/myblog/__pycache__/settings.cpython-37.pyc new file mode 100644 index 0000000..69f1c47 Binary files /dev/null and b/myblog/myblog/__pycache__/settings.cpython-37.pyc differ diff --git a/myblog/myblog/__pycache__/urls.cpython-37.pyc b/myblog/myblog/__pycache__/urls.cpython-37.pyc new file mode 100644 index 0000000..bb73223 Binary files /dev/null and b/myblog/myblog/__pycache__/urls.cpython-37.pyc differ diff --git a/myblog/myblog/__pycache__/wsgi.cpython-37.pyc b/myblog/myblog/__pycache__/wsgi.cpython-37.pyc new file mode 100644 index 0000000..55eab44 Binary files /dev/null and b/myblog/myblog/__pycache__/wsgi.cpython-37.pyc differ