From e9eb2c612156894e87b9fa6584c1f8d05f932fe7 Mon Sep 17 00:00:00 2001 From: luxagraf Date: Tue, 26 Sep 2017 17:49:20 -0600 Subject: updated comments app to work with 1.11 --- app/lib/django_comments/feeds.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'app/lib/django_comments/feeds.py') diff --git a/app/lib/django_comments/feeds.py b/app/lib/django_comments/feeds.py index 0b8ce5b..bc8c501 100644 --- a/app/lib/django_comments/feeds.py +++ b/app/lib/django_comments/feeds.py @@ -1,9 +1,10 @@ +from django.contrib.sites.shortcuts import get_current_site from django.contrib.syndication.views import Feed -from django.contrib.sites.models import get_current_site from django.utils.translation import ugettext as _ import django_comments + class LatestCommentFeed(Feed): """Feed of latest comments on the current site.""" @@ -22,9 +23,9 @@ class LatestCommentFeed(Feed): def items(self): qs = django_comments.get_model().objects.filter( - site__pk = self.site.pk, - is_public = True, - is_removed = False, + site__pk=self.site.pk, + is_public=True, + is_removed=False, ) return qs.order_by('-submit_date')[:40] -- cgit v1.2.3-70-g09d2