annotate gpp/urls.py @ 431:0d91176cf9b3

More work on #211. The compose view now returns the tab fragment HTML so errors can be displayed correctly.
author Brian Neal <bgneal@gmail.com>
date Fri, 06 May 2011 00:02:55 +0000
parents d4d167876c25
children 524fd1b3919a
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@177 4 from django.views.decorators.cache import cache_page
bgneal@170 5
bgneal@415 6 from haystack.views import search_view_factory
bgneal@219 7
gremmie@1 8 from news.feeds import LatestNewsFeed
bgneal@170 9 from forums.feeds import ForumsFeed
bgneal@415 10 from custom_search import ModelSearchView, CustomModelSearchForm
gremmie@1 11
bgneal@141 12
gremmie@1 13 admin.autodiscover()
gremmie@1 14
gremmie@1 15 urlpatterns = patterns('',
bgneal@19 16 url(r'^$', 'views.home', name='home'),
gremmie@1 17 (r'^admin/doc/', include('django.contrib.admindocs.urls')),
gremmie@1 18 (r'^admin/', include(admin.site.urls)),
gremmie@1 19 (r'^accounts/', include('accounts.urls')),
bgneal@215 20 (r'^antispam/', include('antispam.urls')),
gremmie@1 21 (r'^calendar/', include('gcalendar.urls')),
gremmie@1 22 (r'^comments/', include('comments.urls')),
gremmie@1 23 (r'^contact/', include('contact.urls')),
bgneal@127 24 (r'^core/', include('core.urls')),
bgneal@35 25 (r'^donations/', include('donations.urls')),
gremmie@1 26 (r'^downloads/', include('downloads.urls')),
bgneal@176 27 url(r'^feeds/news/$',
bgneal@177 28 cache_page(LatestNewsFeed(), 6 * 60 * 60),
bgneal@176 29 name='feeds-news'),
bgneal@176 30 url(r'^feeds/forums/$',
bgneal@385 31 cache_page(ForumsFeed(), 15 * 60),
bgneal@176 32 {'forum_slug': None},
bgneal@176 33 'feeds-forum_combined'),
bgneal@176 34 url(r'^feeds/forums/(?P<forum_slug>[\w\d-]+)/$',
bgneal@385 35 cache_page(ForumsFeed(), 15 * 60),
bgneal@176 36 name='feeds-forum'),
bgneal@81 37 (r'^forums/', include('forums.urls')),
gremmie@1 38 (r'^irc/', include('irc.urls')),
gremmie@1 39 (r'^links/', include('weblinks.urls')),
gremmie@1 40 (r'^member_map/', include('membermap.urls')),
gremmie@1 41 (r'^messages/', include('messages.urls')),
gremmie@1 42 (r'^news/', include('news.urls')),
bgneal@285 43 (r'^oembed/', include('oembed.urls')),
gremmie@1 44 (r'^podcast/', include('podcast.urls')),
gremmie@1 45 (r'^polls/', include('polls.urls')),
gremmie@1 46 (r'^potd/', include('potd.urls')),
gremmie@1 47 (r'^profile/', include('bio.urls')),
gremmie@1 48 (r'^shout/', include('shoutbox.urls')),
bgneal@12 49 (r'^smiley/', include('smiley.urls')),
bgneal@323 50 (r'^ygroup/', include('ygroup.urls')),
gremmie@1 51 )
gremmie@1 52
bgneal@219 53 # Haystack search views
bgneal@219 54 urlpatterns += patterns('haystack.views',
bgneal@415 55 url(r'^search/$',
bgneal@415 56 search_view_factory(view_class=ModelSearchView,
bgneal@415 57 form_class=CustomModelSearchForm, load_all=True),
bgneal@219 58 name='haystack_search'),
bgneal@219 59 )
bgneal@219 60
bgneal@219 61
gremmie@1 62 if settings.DEBUG:
bgneal@325 63 urlpatterns += patterns('',
bgneal@325 64 (r'^media/(?P<path>.*)$', 'django.views.static.serve', {'document_root': settings.MEDIA_ROOT}),
gremmie@1 65 )