From 2c63f6b33e4c7e73863f74cefc048f5ed98cfe0a Mon Sep 17 00:00:00 2001 From: "Bradley M. Kuhn" Date: Mon, 14 Jul 2014 10:54:25 -0400 Subject: [PATCH] Try putting these settings in each class. I am not sure what the loop was for anyway. --- www/conservancy/feeds.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/www/conservancy/feeds.py b/www/conservancy/feeds.py index 575b80cd..9431810a 100644 --- a/www/conservancy/feeds.py +++ b/www/conservancy/feeds.py @@ -34,6 +34,7 @@ class ConservancyFeedBase(Feed): return { 'year' : year } class PressReleaseFeed(Feed): + get_absolute_url = '/feeds/news/' title = "Software Freedom Conservancy News" link = "/news/" description = "" @@ -64,6 +65,7 @@ class OmnibusFeedType(Rss201rev2Feed): handler.addQuickElement("itunes:block", 'Yes') class OmnibusFeed(ConservancyFeedBase): + get_absolute_url = '/feeds/omnibus/' feed_type = OmnibusFeedType link ="/news/" title = "The Software Freedom Conservancy" @@ -138,6 +140,7 @@ class OmnibusFeed(ConservancyFeedBase): class BlogFeed(ConservancyFeedBase): link = "/blog/" + get_absolute_url = '/feeds/blog/' def title(self): answer = "The Software Freedom Conservancy Blog" @@ -238,11 +241,6 @@ class BlogFeed(ConservancyFeedBase): return queryset.order_by('-pub_date')[:10] - -BlogFeed.get_absolute_url = '/feeds/blog/' -PressRelease.get_absolute_url = '/feeds/news/' -OmnibusFeed.get_absolute_url = '/feeds/omnibus/' - def view(request): """Listing of all available feeds """