comparison gpp/urls.py @ 176:b7ac381996e8

Implement ticket #59; update RSS feeds for Django 1.2.
author Brian Neal <bgneal@gmail.com>
date Thu, 11 Mar 2010 02:34:07 +0000
parents 6f14970b103a
children 9b63ad1f2ad2
comparison
equal deleted inserted replaced
175:776028f4bced 176:b7ac381996e8
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
7 from news.feeds import LatestNewsFeed 5 from news.feeds import LatestNewsFeed
8 from forums.feeds import ForumsFeed 6 from forums.feeds import ForumsFeed
9 7
10 8
11 admin.autodiscover() 9 admin.autodiscover()
12
13 feeds = {
14 'news': LatestNewsFeed,
15 'forums': ForumsFeed,
16 }
17 10
18 urlpatterns = patterns('', 11 urlpatterns = patterns('',
19 url(r'^$', 'views.home', name='home'), 12 url(r'^$', 'views.home', name='home'),
20 (r'^admin/doc/', include('django.contrib.admindocs.urls')), 13 (r'^admin/doc/', include('django.contrib.admindocs.urls')),
21 (r'^admin/', include(admin.site.urls)), 14 (r'^admin/', include(admin.site.urls)),
24 (r'^comments/', include('comments.urls')), 17 (r'^comments/', include('comments.urls')),
25 (r'^contact/', include('contact.urls')), 18 (r'^contact/', include('contact.urls')),
26 (r'^core/', include('core.urls')), 19 (r'^core/', include('core.urls')),
27 (r'^donations/', include('donations.urls')), 20 (r'^donations/', include('donations.urls')),
28 (r'^downloads/', include('downloads.urls')), 21 (r'^downloads/', include('downloads.urls')),
29 url(r'^feeds/(?P<url>.*)/$', 22 url(r'^feeds/news/$',
30 cache_page(syndication_feed, 60 * 15), 23 LatestNewsFeed(),
31 {'feed_dict': feeds}, 24 name='feeds-news'),
32 'feeds-news'), 25 url(r'^feeds/forums/$',
26 ForumsFeed(),
27 {'forum_slug': None},
28 'feeds-forum_combined'),
29 url(r'^feeds/forums/(?P<forum_slug>[\w\d-]+)/$',
30 ForumsFeed(),
31 name='feeds-forum'),
33 (r'^forums/', include('forums.urls')), 32 (r'^forums/', include('forums.urls')),
34 (r'^irc/', include('irc.urls')), 33 (r'^irc/', include('irc.urls')),
35 (r'^links/', include('weblinks.urls')), 34 (r'^links/', include('weblinks.urls')),
36 (r'^member_map/', include('membermap.urls')), 35 (r'^member_map/', include('membermap.urls')),
37 (r'^messages/', include('messages.urls')), 36 (r'^messages/', include('messages.urls')),