From 60728ec4bb786830bae42d4a5f2450f7508b89b3 Mon Sep 17 00:00:00 2001 From: HamInGyu Date: Sun, 20 Jun 2021 21:23:26 +0900 Subject: [PATCH] =?UTF-8?q?[=EC=88=98=EC=A0=95]=20=EA=B2=8C=EC=8B=9C?= =?UTF-8?q?=EB=AC=BC=20=EC=88=98=EC=A0=95=20=EC=98=A4=EB=A5=98=ED=95=B4?= =?UTF-8?q?=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- instagramAssignment/instagram/templates/edit.html | 1 - instagramAssignment/instagram/views.py | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/instagramAssignment/instagram/templates/edit.html b/instagramAssignment/instagram/templates/edit.html index 71c8e17..ba8886c 100644 --- a/instagramAssignment/instagram/templates/edit.html +++ b/instagramAssignment/instagram/templates/edit.html @@ -6,7 +6,6 @@ > {%csrf_token%} -

작성자:

사진:

diff --git a/instagramAssignment/instagram/views.py b/instagramAssignment/instagram/views.py index 7ce0d46..eeb000e 100644 --- a/instagramAssignment/instagram/views.py +++ b/instagramAssignment/instagram/views.py @@ -56,6 +56,7 @@ def update(request, postId): form = PostForm(request.POST,request.FILES) if form.is_valid(): update_post = form.save(commit=False) + update_post.writer = request.user update_post.pub_date = timezone.now() update_post.save() return redirect('detail', update_post.id)