diff gpp/urls.py @ 170:6f14970b103a

Implement #52 Forums RSS feeds.
author Brian Neal <bgneal@gmail.com>
date Thu, 11 Feb 2010 02:29:03 +0000
parents 861f7d5f1b23
children b7ac381996e8
line wrap: on
line diff
--- a/gpp/urls.py	Sun Jan 31 04:52:08 2010 +0000
+++ b/gpp/urls.py	Thu Feb 11 02:29:03 2010 +0000
@@ -1,13 +1,18 @@
 from django.conf.urls.defaults import *
 from django.conf import settings
 from django.contrib import admin
+from django.views.decorators.cache import cache_page
+from django.contrib.syndication.views import feed as syndication_feed
+
 from news.feeds import LatestNewsFeed
+from forums.feeds import ForumsFeed
 
 
 admin.autodiscover()
 
 feeds = {
    'news': LatestNewsFeed,
+   'forums': ForumsFeed,
 }
 
 urlpatterns = patterns('',
@@ -21,9 +26,9 @@
    (r'^core/', include('core.urls')),
    (r'^donations/', include('donations.urls')),
    (r'^downloads/', include('downloads.urls')),
-   url(r'^feeds/(?P<url>.*)/$', 
-      'django.contrib.syndication.views.feed', 
-      {'feed_dict': feeds },
+   url(r'^feeds/(?P<url>.*)/$',
+      cache_page(syndication_feed, 60 * 15),
+      {'feed_dict': feeds},
       'feeds-news'),
    (r'^forums/', include('forums.urls')),
    (r'^irc/', include('irc.urls')),