76efbb32af57ae72f885fdc831e602ef74871c05
[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.contrib.auth.views.login'),
14     url(r'^accounts/logout/', 'archive.views.logout_view', 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 )