f3113c894181fd0211a8c7941abd87a3f0905fee
[audio.git] / src / audiobooks / urls.py
1 from django.conf import settings
2 from django.conf.urls import patterns, include, url
3 from django.views.generic import RedirectView
4
5 # Uncomment the next two lines to enable the admin:
6 from django.contrib import admin
7 admin.autodiscover()
8
9 urlpatterns = patterns('',
10     url(r'^$', RedirectView.as_view(url='archive/')),
11     url(r'^archive/', include('archive.urls')),
12
13     url(r'^admin/', include(admin.site.urls)),
14     url(r'^accounts/login/$', 'django_cas.views.login', name='login'),
15     url(r'^accounts/logout/$', 'django_cas.views.logout', name='logout'),
16 )
17
18 if settings.DEBUG:
19     urlpatterns += patterns('',
20         (r'^media/(?P<path>.*)$', 'django.views.static.serve', {'document_root': settings.MEDIA_ROOT, 'show_indexes':True}),
21 )