Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added weblog RSS feed to django_website

git-svn-id: http://code.djangoproject.com/svn/djangoproject.com@37 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit f905dc0a0af1b7615d1ac3a5ee06bbde4bd360fb 1 parent 266a721
adrian authored
View
15 django_website/settings/main_rss.py
@@ -0,0 +1,15 @@
+from django.core import rss
+from django.models.blog import entries
+
+weblog_entry_feed = rss.FeedConfiguration(
+ slug = 'weblog',
+ title_cb = lambda param: "The Django weblog",
+ link_cb = lambda param: "http://www.djangoproject.com/weblog/",
+ description_cb = lambda param: "Latest news about Django, the Python Web framework.",
+ get_list_func_cb = lambda obj: entries.get_list,
+ get_list_kwargs = {
+ 'limit': 10,
+ }
+)
+
+rss.register_feed(weblog_entry_feed)
View
1  django_website/settings/urls/main.py
@@ -3,5 +3,6 @@
urlpatterns = patterns('',
(r'^weblog/', include('django_website.apps.blog.urls.blog')),
(r'^documentation/', include('django_website.apps.docs.urls.docs')),
+ (r'^rss/', include('django.conf.urls.rss')),
(r'', include('django.conf.urls.flatfiles')),
)
Please sign in to comment.
Something went wrong with that request. Please try again.