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