diff options
author | luxagraf <sng@luxagraf.net> | 2017-09-26 17:49:20 -0600 |
---|---|---|
committer | luxagraf <sng@luxagraf.net> | 2017-09-26 17:49:20 -0600 |
commit | e9eb2c612156894e87b9fa6584c1f8d05f932fe7 (patch) | |
tree | dc9ee22c618eade87186086d1b09b82bd54ffcbe /app/lib/django_comments/feeds.py | |
parent | a5f1c0580091f21fa4fd8817b41c55fa2ff6d0dc (diff) |
updated comments app to work with 1.11
Diffstat (limited to 'app/lib/django_comments/feeds.py')
-rw-r--r-- | app/lib/django_comments/feeds.py | 9 |
1 files changed, 5 insertions, 4 deletions
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] |