bgneal@574: from django.conf.urls import patterns, url, include bgneal@580: from django.conf.urls.static import static bgneal@6: from django.conf import settings gremmie@1: from django.contrib import admin bgneal@177: from django.views.decorators.cache import cache_page bgneal@170: bgneal@415: from haystack.views import search_view_factory bgneal@219: gremmie@1: from news.feeds import LatestNewsFeed bgneal@170: from forums.feeds import ForumsFeed bgneal@469: from custom_search.forms import CustomModelSearchForm gremmie@1: bgneal@141: gremmie@1: admin.autodiscover() gremmie@1: gremmie@1: urlpatterns = patterns('', bgneal@19: url(r'^$', 'views.home', name='home'), gremmie@1: (r'^admin/doc/', include('django.contrib.admindocs.urls')), bgneal@579: bgneal@579: url(r'^admin/password_reset/$', 'django.contrib.auth.views.password_reset', name='admin_password_reset'), bgneal@579: (r'^admin/password_reset/done/$', 'django.contrib.auth.views.password_reset_done'), bgneal@579: (r'^reset/(?P[0-9A-Za-z]+)-(?P.+)/$', 'django.contrib.auth.views.password_reset_confirm'), bgneal@579: (r'^reset/done/$', 'django.contrib.auth.views.password_reset_complete'), bgneal@579: gremmie@1: (r'^admin/', include(admin.site.urls)), gremmie@1: (r'^accounts/', include('accounts.urls')), bgneal@215: (r'^antispam/', include('antispam.urls')), gremmie@1: (r'^calendar/', include('gcalendar.urls')), gremmie@1: (r'^comments/', include('comments.urls')), gremmie@1: (r'^contact/', include('contact.urls')), bgneal@540: (r'^contests/', include('contests.urls')), bgneal@127: (r'^core/', include('core.urls')), bgneal@35: (r'^donations/', include('donations.urls')), gremmie@1: (r'^downloads/', include('downloads.urls')), bgneal@176: url(r'^feeds/news/$', bgneal@573: cache_page(6 * 60 * 60)(LatestNewsFeed()), bgneal@176: name='feeds-news'), bgneal@176: url(r'^feeds/forums/$', bgneal@573: cache_page(5 * 60)(ForumsFeed()), bgneal@176: {'forum_slug': None}, bgneal@176: 'feeds-forum_combined'), bgneal@176: url(r'^feeds/forums/(?P[\w\d-]+)/$', bgneal@573: cache_page(5 * 60)(ForumsFeed()), bgneal@176: name='feeds-forum'), bgneal@81: (r'^forums/', include('forums.urls')), gremmie@1: (r'^irc/', include('irc.urls')), gremmie@1: (r'^links/', include('weblinks.urls')), gremmie@1: (r'^member_map/', include('membermap.urls')), gremmie@1: (r'^messages/', include('messages.urls')), gremmie@1: (r'^news/', include('news.urls')), bgneal@285: (r'^oembed/', include('oembed.urls')), bgneal@544: (r'^pb/', include('phantombrigade.urls')), gremmie@1: (r'^podcast/', include('podcast.urls')), gremmie@1: (r'^polls/', include('polls.urls')), gremmie@1: (r'^potd/', include('potd.urls')), gremmie@1: (r'^profile/', include('bio.urls')), gremmie@1: (r'^shout/', include('shoutbox.urls')), bgneal@12: (r'^smiley/', include('smiley.urls')), bgneal@323: (r'^ygroup/', include('ygroup.urls')), gremmie@1: ) gremmie@1: bgneal@219: # Haystack search views bgneal@219: urlpatterns += patterns('haystack.views', bgneal@415: url(r'^search/$', bgneal@438: search_view_factory(form_class=CustomModelSearchForm, load_all=True), bgneal@219: name='haystack_search'), bgneal@219: ) bgneal@219: bgneal@580: # For serving media files in development only: bgneal@580: urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)