2 from django.contrib.syndication.views import Feed, FeedDoesNotExist
4 from django.contrib.syndication.feeds import Feed, FeedDoesNotExist
6 from django.utils.translation import ugettext as _
7 from models import Question
8 from forum import settings
11 class RssQuestionFeed(Feed):
12 copyright = settings.APP_COPYRIGHT
14 def __init__(self, question_list, title, description, request):
16 self._description = description
17 self._question_list = question_list
18 self._url = request.path
26 def item_link(self, item):
27 return item.get_absolute_url()
29 def item_author_name(self, item):
30 return item.author.username
32 def item_author_link(self, item):
33 return item.author.get_profile_url()
35 def item_pubdate(self, item):
38 def items(self, item):
39 return self._question_list[:30]