annotate gpp/urls.py @ 579:217a6319278c

For Django 1.4, added the admin password reset feature.
author Brian Neal <bgneal@gmail.com>
date Sat, 05 May 2012 14:59:20 -0500
parents ddd69a8e07c7
children c525f3e0b5d0
rev   line source
bgneal@574 1 from django.conf.urls import patterns, url, include
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@469 10 from custom_search.forms import 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')),
bgneal@579 18
bgneal@579 19 url(r'^admin/password_reset/$', 'django.contrib.auth.views.password_reset', name='admin_password_reset'),
bgneal@579 20 (r'^admin/password_reset/done/$', 'django.contrib.auth.views.password_reset_done'),
bgneal@579 21 (r'^reset/(?P<uidb36>[0-9A-Za-z]+)-(?P<token>.+)/$', 'django.contrib.auth.views.password_reset_confirm'),
bgneal@579 22 (r'^reset/done/$', 'django.contrib.auth.views.password_reset_complete'),
bgneal@579 23
gremmie@1 24 (r'^admin/', include(admin.site.urls)),
gremmie@1 25 (r'^accounts/', include('accounts.urls')),
bgneal@215 26 (r'^antispam/', include('antispam.urls')),
gremmie@1 27 (r'^calendar/', include('gcalendar.urls')),
gremmie@1 28 (r'^comments/', include('comments.urls')),
gremmie@1 29 (r'^contact/', include('contact.urls')),
bgneal@540 30 (r'^contests/', include('contests.urls')),
bgneal@127 31 (r'^core/', include('core.urls')),
bgneal@35 32 (r'^donations/', include('donations.urls')),
gremmie@1 33 (r'^downloads/', include('downloads.urls')),
bgneal@176 34 url(r'^feeds/news/$',
bgneal@573 35 cache_page(6 * 60 * 60)(LatestNewsFeed()),
bgneal@176 36 name='feeds-news'),
bgneal@176 37 url(r'^feeds/forums/$',
bgneal@573 38 cache_page(5 * 60)(ForumsFeed()),
bgneal@176 39 {'forum_slug': None},
bgneal@176 40 'feeds-forum_combined'),
bgneal@176 41 url(r'^feeds/forums/(?P<forum_slug>[\w\d-]+)/$',
bgneal@573 42 cache_page(5 * 60)(ForumsFeed()),
bgneal@176 43 name='feeds-forum'),
bgneal@81 44 (r'^forums/', include('forums.urls')),
gremmie@1 45 (r'^irc/', include('irc.urls')),
gremmie@1 46 (r'^links/', include('weblinks.urls')),
gremmie@1 47 (r'^member_map/', include('membermap.urls')),
gremmie@1 48 (r'^messages/', include('messages.urls')),
gremmie@1 49 (r'^news/', include('news.urls')),
bgneal@285 50 (r'^oembed/', include('oembed.urls')),
bgneal@544 51 (r'^pb/', include('phantombrigade.urls')),
gremmie@1 52 (r'^podcast/', include('podcast.urls')),
gremmie@1 53 (r'^polls/', include('polls.urls')),
gremmie@1 54 (r'^potd/', include('potd.urls')),
gremmie@1 55 (r'^profile/', include('bio.urls')),
gremmie@1 56 (r'^shout/', include('shoutbox.urls')),
bgneal@12 57 (r'^smiley/', include('smiley.urls')),
bgneal@323 58 (r'^ygroup/', include('ygroup.urls')),
gremmie@1 59 )
gremmie@1 60
bgneal@219 61 # Haystack search views
bgneal@219 62 urlpatterns += patterns('haystack.views',
bgneal@415 63 url(r'^search/$',
bgneal@438 64 search_view_factory(form_class=CustomModelSearchForm, load_all=True),
bgneal@219 65 name='haystack_search'),
bgneal@219 66 )
bgneal@219 67
bgneal@219 68
gremmie@1 69 if settings.DEBUG:
bgneal@325 70 urlpatterns += patterns('',
bgneal@325 71 (r'^media/(?P<path>.*)$', 'django.views.static.serve', {'document_root': settings.MEDIA_ROOT}),
gremmie@1 72 )