Permalink
Browse files

Added RSS feed configuration for community aggregator

git-svn-id: http://code.djangoproject.com/svn/djangoproject.com@428 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
1 parent 8805f2b commit 09987cb314d177109d733083d08cac2ba7cbf2f7 jacob committed Aug 7, 2005
View
3 django_website/apps/aggregator/models/aggregator.py
@@ -25,3 +25,6 @@ class FeedItem(meta.Model):
def __repr__(self):
return self.title
+
+ def get_absolute_url(self):
+ return self.link
View
13 django_website/settings/main_rss.py
@@ -1,6 +1,7 @@
from django.core import rss
from django.models.blog import entries
from django.models.comments import freecomments
+from django.models.aggregator import feeditems
weblog_entry_feed = rss.FeedConfiguration(
slug = 'weblog',
@@ -24,5 +25,17 @@
}
)
+community_aggregator = rss.FeedConfiguration(
+ slug = 'community',
+ title_cb = lambda param: "The Django community aggregator",
+ link_cb = lambda param: "http://www.djangoproject.com/community/",
+ description_cb = lambda param: "Aggregated feeds from the Django community.",
+ get_list_func_cb = lambda obj: feeditems.get_list,
+ get_list_kwargs = {
+ 'limit' : 10,
+ }
+)
+
rss.register_feed(recent_comments)
rss.register_feed(weblog_entry_feed)
+rss.register_feed(community_aggregator)
View
1 django_website/templates/rss/community_description.html
@@ -0,0 +1 @@
+{{ obj.summary }}
View
1 django_website/templates/rss/community_title.html
@@ -0,0 +1 @@
+{{ obj.title }}

0 comments on commit 09987cb

Please sign in to comment.