summaryrefslogtreecommitdiff
path: root/app/lib/django_comments_old/feeds.py
diff options
context:
space:
mode:
authorluxagraf <sng@luxagraf.net>2017-10-14 11:36:20 -0500
committerluxagraf <sng@luxagraf.net>2017-10-14 11:36:20 -0500
commitbd1adb4927695ed0ce3ac94d90c68bd61e440275 (patch)
treef014fa16a64eb55e62ecb92c62a4e8186cd318a4 /app/lib/django_comments_old/feeds.py
parentcbadfff80be33b4ec67da57585451884c6378380 (diff)
updated comments app and added caption to photo list view
Diffstat (limited to 'app/lib/django_comments_old/feeds.py')
-rw-r--r--app/lib/django_comments_old/feeds.py32
1 files changed, 0 insertions, 32 deletions
diff --git a/app/lib/django_comments_old/feeds.py b/app/lib/django_comments_old/feeds.py
deleted file mode 100644
index 0b8ce5b..0000000
--- a/app/lib/django_comments_old/feeds.py
+++ /dev/null
@@ -1,32 +0,0 @@
-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."""
-
- def __call__(self, request, *args, **kwargs):
- self.site = get_current_site(request)
- return super(LatestCommentFeed, self).__call__(request, *args, **kwargs)
-
- def title(self):
- return _("%(site_name)s comments") % dict(site_name=self.site.name)
-
- def link(self):
- return "http://%s/" % (self.site.domain)
-
- def description(self):
- return _("Latest comments on %(site_name)s") % dict(site_name=self.site.name)
-
- def items(self):
- qs = django_comments.get_model().objects.filter(
- site__pk = self.site.pk,
- is_public = True,
- is_removed = False,
- )
- return qs.order_by('-submit_date')[:40]
-
- def item_pubdate(self, item):
- return item.submit_date