From b8680d1de69535a8c10812fef44c15684501f0c5 Mon Sep 17 00:00:00 2001 From: Yaroslsav-95 Date: Mon, 8 Oct 2018 07:34:20 +0300 Subject: added publish date to comments, css for comments --- weblog/views.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'weblog/views.py') diff --git a/weblog/views.py b/weblog/views.py index 72700c0..d3a7066 100755 --- a/weblog/views.py +++ b/weblog/views.py @@ -223,10 +223,10 @@ def PostView(request, category_slug, post_slug, language=None): # Make sure that either anonymous comments are allowed or # that the user is authenticated if request.user.is_authenticated: - new_comment = PostComment(author=request.user, post=post, content=comment_content) + new_comment = PostComment(author=request.user, post=post, content=comment_content, publish_date=datetime.datetime.now()) new_comment.save() elif ALLOW_ANON_COMMENTS: - new_comment = PostComment(post=post, content=comment_content) + new_comment = PostComment(post=post, content=comment_content, publish_date=datetime.datetime.now()) new_comment.save() else: context_dict['comment_submission_error'] = _('You need to sign in to submit a comment') -- cgit v1.2.3