From 741edb87ef484865f55f90ab794867c5e56b209f Mon Sep 17 00:00:00 2001 From: Adolfo Fitoria Date: Thu, 19 Jan 2012 14:25:24 -0300 Subject: updated feed class again --- askbot/feed.py | 37 +++++++++++++++++++++++++++---------- 1 file changed, 27 insertions(+), 10 deletions(-) diff --git a/askbot/feed.py b/askbot/feed.py index 6df9b8aa..490f494b 100644 --- a/askbot/feed.py +++ b/askbot/feed.py @@ -25,10 +25,16 @@ from askbot.conf import settings as askbot_settings class RssIndividualQuestionFeed(Feed): """rss feed class for particular questions """ - title = askbot_settings.APP_TITLE + _(' - ')+ _('Individual question feed') - #link = askbot_settings.APP_URL - description = askbot_settings.APP_DESCRIPTION - copyright = askbot_settings.APP_COPYRIGHT + + def title(self): + return askbot_settings.APP_TITLE + _(' - ') + \ + _('Individual question feed') + + def feed_copyright(self): + return askbot_settings.APP_COPYRIGHT + + def description(self): + return askbot_settings.APP_DESCRIPTION def get_object(self, bits): if len(bits) != 1: @@ -40,6 +46,9 @@ class RssIndividualQuestionFeed(Feed): """ return askbot_settings.APP_URL + item.get_absolute_url() + def link(self): + return askbot_settings.APP_URL + def item_pubdate(self, item): """get date of creation for the item """ @@ -86,17 +95,25 @@ class RssIndividualQuestionFeed(Feed): class RssLastestQuestionsFeed(Feed): """rss feed class for the latest questions """ - title = askbot_settings.APP_TITLE + _(' - ')+ _('latest questions') - #link = askbot_settings.APP_URL - description = askbot_settings.APP_DESCRIPTION - #ttl = 10 - copyright = askbot_settings.APP_COPYRIGHT + + def title(self): + return askbot_settings.APP_TITLE + _(' - ') + \ + _('Individual question feed') + + def feed_copyright(self): + return askbot_settings.APP_COPYRIGHT + + def description(self): + return askbot_settings.APP_DESCRIPTION def item_link(self, item): """get full url to the item """ return askbot_settings.APP_URL + item.get_absolute_url() + def link(self): + return askbot_settings.APP_URL + def item_author_name(self, item): """get name of author """ @@ -119,7 +136,7 @@ class RssLastestQuestionsFeed(Feed): return askbot_settings.APP_URL + item.get_absolute_url(no_slug = True) def item_description(self, item): - """returns the desciption for the item + """returns the description for the item """ return item.text -- cgit v1.2.3-1-g7c22