annotate gpp/urls.py @ 174:e9c718065a25

Ticket #58; use Django 1.2's cached template loader.
author Brian Neal <bgneal@gmail.com>
date Wed, 03 Mar 2010 04:04:11 +0000
parents 6f14970b103a
children b7ac381996e8
rev   line source
gremmie@1 1 from django.conf.urls.defaults import *
bgneal@6 2 from django.conf import settings
gremmie@1 3 from django.contrib import admin
bgneal@170 4 from django.views.decorators.cache import cache_page
bgneal@170 5 from django.contrib.syndication.views import feed as syndication_feed
bgneal@170 6
gremmie@1 7 from news.feeds import LatestNewsFeed
bgneal@170 8 from forums.feeds import ForumsFeed
gremmie@1 9
bgneal@141 10
gremmie@1 11 admin.autodiscover()
gremmie@1 12
gremmie@1 13 feeds = {
gremmie@1 14 'news': LatestNewsFeed,
bgneal@170 15 'forums': ForumsFeed,
gremmie@1 16 }
gremmie@1 17
gremmie@1 18 urlpatterns = patterns('',
bgneal@19 19 url(r'^$', 'views.home', name='home'),
gremmie@1 20 (r'^admin/doc/', include('django.contrib.admindocs.urls')),
gremmie@1 21 (r'^admin/', include(admin.site.urls)),
gremmie@1 22 (r'^accounts/', include('accounts.urls')),
gremmie@1 23 (r'^calendar/', include('gcalendar.urls')),
gremmie@1 24 (r'^comments/', include('comments.urls')),
gremmie@1 25 (r'^contact/', include('contact.urls')),
bgneal@127 26 (r'^core/', include('core.urls')),
bgneal@35 27 (r'^donations/', include('donations.urls')),
gremmie@1 28 (r'^downloads/', include('downloads.urls')),
bgneal@170 29 url(r'^feeds/(?P<url>.*)/$',
bgneal@170 30 cache_page(syndication_feed, 60 * 15),
bgneal@170 31 {'feed_dict': feeds},
gremmie@1 32 'feeds-news'),
bgneal@81 33 (r'^forums/', include('forums.urls')),
gremmie@1 34 (r'^irc/', include('irc.urls')),
gremmie@1 35 (r'^links/', include('weblinks.urls')),
gremmie@1 36 (r'^member_map/', include('membermap.urls')),
gremmie@1 37 (r'^messages/', include('messages.urls')),
gremmie@1 38 (r'^news/', include('news.urls')),
gremmie@1 39 (r'^podcast/', include('podcast.urls')),
gremmie@1 40 (r'^polls/', include('polls.urls')),
gremmie@1 41 (r'^potd/', include('potd.urls')),
gremmie@1 42 (r'^profile/', include('bio.urls')),
gremmie@1 43 (r'^shout/', include('shoutbox.urls')),
bgneal@12 44 (r'^smiley/', include('smiley.urls')),
gremmie@1 45 )
gremmie@1 46
gremmie@1 47 if settings.DEBUG:
gremmie@1 48 urlpatterns += patterns('',
gremmie@1 49 (r'^static/(?P<path>.*)$', 'django.views.static.serve', {'document_root': settings.MEDIA_ROOT}),
gremmie@1 50 )