gremmie@1: from django.conf.urls.defaults import * 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@219: from haystack.views import SearchView, search_view_factory bgneal@219: gremmie@1: from news.feeds import LatestNewsFeed bgneal@170: from forums.feeds import ForumsFeed 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')), 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@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@177: cache_page(LatestNewsFeed(), 6 * 60 * 60), bgneal@176: name='feeds-news'), bgneal@176: url(r'^feeds/forums/$', bgneal@177: cache_page(ForumsFeed(), 1 * 60 * 60), bgneal@176: {'forum_slug': None}, bgneal@176: 'feeds-forum_combined'), bgneal@176: url(r'^feeds/forums/(?P[\w\d-]+)/$', bgneal@177: cache_page(ForumsFeed(), 1 * 60 * 60), 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')), 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')), gremmie@1: ) gremmie@1: bgneal@219: # Haystack search views bgneal@219: urlpatterns += patterns('haystack.views', bgneal@220: url(r'^search/$', search_view_factory(view_class=SearchView, load_all=True), bgneal@219: name='haystack_search'), bgneal@219: ) bgneal@219: bgneal@219: gremmie@1: if settings.DEBUG: bgneal@312: urlpatterns += patterns('django.contrib.staticfiles.views', bgneal@312: (r'^media/(?P.*)$', 'serve', {'document_root': settings.MEDIA_ROOT}), gremmie@1: )