comparison 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
comparison
equal deleted inserted replaced
169:7071b196ddd5 170:6f14970b103a
1 from django.conf.urls.defaults import * 1 from django.conf.urls.defaults import *
2 from django.conf import settings 2 from django.conf import settings
3 from django.contrib import admin 3 from django.contrib import admin
4 from django.views.decorators.cache import cache_page
5 from django.contrib.syndication.views import feed as syndication_feed
6
4 from news.feeds import LatestNewsFeed 7 from news.feeds import LatestNewsFeed
8 from forums.feeds import ForumsFeed
5 9
6 10
7 admin.autodiscover() 11 admin.autodiscover()
8 12
9 feeds = { 13 feeds = {
10 'news': LatestNewsFeed, 14 'news': LatestNewsFeed,
15 'forums': ForumsFeed,
11 } 16 }
12 17
13 urlpatterns = patterns('', 18 urlpatterns = patterns('',
14 url(r'^$', 'views.home', name='home'), 19 url(r'^$', 'views.home', name='home'),
15 (r'^admin/doc/', include('django.contrib.admindocs.urls')), 20 (r'^admin/doc/', include('django.contrib.admindocs.urls')),
19 (r'^comments/', include('comments.urls')), 24 (r'^comments/', include('comments.urls')),
20 (r'^contact/', include('contact.urls')), 25 (r'^contact/', include('contact.urls')),
21 (r'^core/', include('core.urls')), 26 (r'^core/', include('core.urls')),
22 (r'^donations/', include('donations.urls')), 27 (r'^donations/', include('donations.urls')),
23 (r'^downloads/', include('downloads.urls')), 28 (r'^downloads/', include('downloads.urls')),
24 url(r'^feeds/(?P<url>.*)/$', 29 url(r'^feeds/(?P<url>.*)/$',
25 'django.contrib.syndication.views.feed', 30 cache_page(syndication_feed, 60 * 15),
26 {'feed_dict': feeds }, 31 {'feed_dict': feeds},
27 'feeds-news'), 32 'feeds-news'),
28 (r'^forums/', include('forums.urls')), 33 (r'^forums/', include('forums.urls')),
29 (r'^irc/', include('irc.urls')), 34 (r'^irc/', include('irc.urls')),
30 (r'^links/', include('weblinks.urls')), 35 (r'^links/', include('weblinks.urls')),
31 (r'^member_map/', include('membermap.urls')), 36 (r'^member_map/', include('membermap.urls')),