From f08af5db27fcda1d3b3bd7d176ace2141488b6ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yaroslav=20de=20la=20Pe=C3=B1a?= Date: Thu, 19 Jul 2018 22:52:35 +0300 Subject: bug fix, deprecated is_authenticated() not compatible with django 2.0 --- weblog/templates/weblog/post.html | 2 +- weblog/views.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/weblog/templates/weblog/post.html b/weblog/templates/weblog/post.html index 623a7d1..ea2cd98 100755 --- a/weblog/templates/weblog/post.html +++ b/weblog/templates/weblog/post.html @@ -25,7 +25,7 @@ {% endif %} {% if post_categories %}
-

{% trans 'Categories' context 'Post categories' %}: +

{% trans 'Categories' context 'Post categories' %}: {% for post_category in post_categories %} {{ post_category.name }} {% endfor %} diff --git a/weblog/views.py b/weblog/views.py index 03de5a7..fe050a4 100755 --- a/weblog/views.py +++ b/weblog/views.py @@ -212,7 +212,7 @@ def PostView(request, category_slug, post_slug, language=None): comment_content = form.cleaned_data['content'] # Make sure that either anonymous comments are allowed or # that the user is authenticated - if request.user.is_authenticated(): + if request.user.is_authenticated: new_comment = PostComment(author=request.user, post=post, content=comment_content) new_comment.save() elif ALLOW_ANON_COMMENTS: -- cgit v1.2.3