Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
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...
commit 09987cb314d177109d733083d08cac2ba7cbf2f7 1 parent 8805f2b
jacob authored
3  django_website/apps/aggregator/models/aggregator.py
View
@@ -25,3 +25,6 @@ class FeedItem(meta.Model):
def __repr__(self):
return self.title
+
+ def get_absolute_url(self):
+ return self.link
13 django_website/settings/main_rss.py
View
@@ -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)
1  django_website/templates/rss/community_description.html
View
@@ -0,0 +1 @@
+{{ obj.summary }}
1  django_website/templates/rss/community_title.html
View
@@ -0,0 +1 @@
+{{ obj.title }}
Please sign in to comment.
Something went wrong with that request. Please try again.