annotate gpp/urls.py @ 293:c92fb89dbc7d

Fixed a bug where if you tried to delete a topic the new last post might be in that topic, so a cascading delete would occur and the forum would get deleted.
author Brian Neal <bgneal@gmail.com>
date Wed, 29 Dec 2010 04:56:53 +0000
parents 8fd4984d5c3b
children 88b2b9cb8c1f
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@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')),
gremmie@1 49 )
gremmie@1 50
bgneal@219 51 # Haystack search views
bgneal@219 52 urlpatterns += patterns('haystack.views',
bgneal@220 53 url(r'^search/$', search_view_factory(view_class=SearchView, load_all=True),
bgneal@219 54 name='haystack_search'),
bgneal@219 55 )
bgneal@219 56
bgneal@219 57
gremmie@1 58 if settings.DEBUG:
gremmie@1 59 urlpatterns += patterns('',
bgneal@255 60 (r'^media/(?P<path>.*)$', 'django.views.static.serve', {'document_root': settings.MEDIA_ROOT}),
gremmie@1 61 )