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)