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@177
|
4 from django.views.decorators.cache import cache_page
|
bgneal@170
|
5
|
bgneal@219
|
6 from haystack.views import SearchView, search_view_factory
|
bgneal@219
|
7
|
gremmie@1
|
8 from news.feeds import LatestNewsFeed
|
bgneal@170
|
9 from forums.feeds import ForumsFeed
|
gremmie@1
|
10
|
bgneal@141
|
11
|
gremmie@1
|
12 admin.autodiscover()
|
gremmie@1
|
13
|
gremmie@1
|
14 urlpatterns = patterns('',
|
bgneal@19
|
15 url(r'^$', 'views.home', name='home'),
|
gremmie@1
|
16 (r'^admin/doc/', include('django.contrib.admindocs.urls')),
|
gremmie@1
|
17 (r'^admin/', include(admin.site.urls)),
|
gremmie@1
|
18 (r'^accounts/', include('accounts.urls')),
|
bgneal@215
|
19 (r'^antispam/', include('antispam.urls')),
|
gremmie@1
|
20 (r'^calendar/', include('gcalendar.urls')),
|
gremmie@1
|
21 (r'^comments/', include('comments.urls')),
|
gremmie@1
|
22 (r'^contact/', include('contact.urls')),
|
bgneal@127
|
23 (r'^core/', include('core.urls')),
|
bgneal@35
|
24 (r'^donations/', include('donations.urls')),
|
gremmie@1
|
25 (r'^downloads/', include('downloads.urls')),
|
bgneal@176
|
26 url(r'^feeds/news/$',
|
bgneal@177
|
27 cache_page(LatestNewsFeed(), 6 * 60 * 60),
|
bgneal@176
|
28 name='feeds-news'),
|
bgneal@176
|
29 url(r'^feeds/forums/$',
|
bgneal@177
|
30 cache_page(ForumsFeed(), 1 * 60 * 60),
|
bgneal@176
|
31 {'forum_slug': None},
|
bgneal@176
|
32 'feeds-forum_combined'),
|
bgneal@176
|
33 url(r'^feeds/forums/(?P<forum_slug>[\w\d-]+)/$',
|
bgneal@177
|
34 cache_page(ForumsFeed(), 1 * 60 * 60),
|
bgneal@176
|
35 name='feeds-forum'),
|
bgneal@81
|
36 (r'^forums/', include('forums.urls')),
|
gremmie@1
|
37 (r'^irc/', include('irc.urls')),
|
gremmie@1
|
38 (r'^links/', include('weblinks.urls')),
|
gremmie@1
|
39 (r'^member_map/', include('membermap.urls')),
|
gremmie@1
|
40 (r'^messages/', include('messages.urls')),
|
gremmie@1
|
41 (r'^news/', include('news.urls')),
|
bgneal@285
|
42 (r'^oembed/', include('oembed.urls')),
|
gremmie@1
|
43 (r'^podcast/', include('podcast.urls')),
|
gremmie@1
|
44 (r'^polls/', include('polls.urls')),
|
gremmie@1
|
45 (r'^potd/', include('potd.urls')),
|
gremmie@1
|
46 (r'^profile/', include('bio.urls')),
|
gremmie@1
|
47 (r'^shout/', include('shoutbox.urls')),
|
bgneal@12
|
48 (r'^smiley/', include('smiley.urls')),
|
bgneal@323
|
49 (r'^ygroup/', include('ygroup.urls')),
|
gremmie@1
|
50 )
|
gremmie@1
|
51
|
bgneal@219
|
52 # Haystack search views
|
bgneal@219
|
53 urlpatterns += patterns('haystack.views',
|
bgneal@220
|
54 url(r'^search/$', search_view_factory(view_class=SearchView, load_all=True),
|
bgneal@219
|
55 name='haystack_search'),
|
bgneal@219
|
56 )
|
bgneal@219
|
57
|
bgneal@219
|
58
|
gremmie@1
|
59 if settings.DEBUG:
|
bgneal@325
|
60 urlpatterns += patterns('',
|
bgneal@325
|
61 (r'^media/(?P<path>.*)$', 'django.views.static.serve', {'document_root': settings.MEDIA_ROOT}),
|
gremmie@1
|
62 )
|