Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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
authored August 07, 2005
3  django_website/apps/aggregator/models/aggregator.py
@@ -25,3 +25,6 @@ class FeedItem(meta.Model):
25 25
 
26 26
     def __repr__(self):
27 27
         return self.title
  28
+        
  29
+    def get_absolute_url(self):
  30
+        return self.link
13  django_website/settings/main_rss.py
... ...
@@ -1,6 +1,7 @@
1 1
 from django.core import rss
2 2
 from django.models.blog import entries
3 3
 from django.models.comments import freecomments
  4
+from django.models.aggregator import feeditems
4 5
 
5 6
 weblog_entry_feed = rss.FeedConfiguration(
6 7
     slug = 'weblog',
@@ -24,5 +25,17 @@
24 25
     }
25 26
 )
26 27
 
  28
+community_aggregator = rss.FeedConfiguration(
  29
+    slug = 'community',
  30
+    title_cb = lambda param: "The Django community aggregator",
  31
+    link_cb = lambda param: "http://www.djangoproject.com/community/",
  32
+    description_cb = lambda param: "Aggregated feeds from the Django community.",
  33
+    get_list_func_cb = lambda obj: feeditems.get_list,
  34
+    get_list_kwargs = {
  35
+        'limit' :  10,
  36
+    }
  37
+)
  38
+
27 39
 rss.register_feed(recent_comments)
28 40
 rss.register_feed(weblog_entry_feed)
  41
+rss.register_feed(community_aggregator)
1  django_website/templates/rss/community_description.html
... ...
@@ -0,0 +1 @@
  1
+{{ obj.summary }}
1  django_website/templates/rss/community_title.html
... ...
@@ -0,0 +1 @@
  1
+{{ obj.title }}

0 notes on commit 09987cb

Please sign in to comment.
Something went wrong with that request. Please try again.