diff options
author | Yaroslsav-95 <contact@yaroslavps.com> | 2018-10-08 07:34:20 +0300 |
---|---|---|
committer | Yaroslsav-95 <contact@yaroslavps.com> | 2018-10-08 07:34:20 +0300 |
commit | b8680d1de69535a8c10812fef44c15684501f0c5 (patch) | |
tree | 1974cb22fe89caec4bb20cf238f8b0ea5e74fd42 /weblog/views.py | |
parent | 246dd98e40436371ff9a96f5cf68a5c496a60153 (diff) | |
download | w3blog-b8680d1de69535a8c10812fef44c15684501f0c5.tar.gz w3blog-b8680d1de69535a8c10812fef44c15684501f0c5.zip |
added publish date to comments, css for comments
Diffstat (limited to 'weblog/views.py')
-rwxr-xr-x | weblog/views.py | 4 |
1 files changed, 2 insertions, 2 deletions
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') |