X-Git-Url: https://git.mdrn.pl/audio.git/blobdiff_plain/2d1d955bb3b4a5ca4dad1153c062c9ab3b6319e7..e927d217b3ad62c17b43c34ca5838c61fc1928e8:/audiobooks/urls.py?ds=sidebyside diff --git a/audiobooks/urls.py b/audiobooks/urls.py index 2cb91e0..9ad2de4 100644 --- a/audiobooks/urls.py +++ b/audiobooks/urls.py @@ -1,3 +1,4 @@ +from django.conf import settings from django.conf.urls.defaults import patterns, include, url # Uncomment the next two lines to enable the admin: @@ -9,4 +10,11 @@ urlpatterns = patterns('', url(r'^archive/', include('archive.urls')), url(r'^admin/', include(admin.site.urls)), + url(r'^accounts/login/$', 'django_cas.views.login', name='login'), + url(r'^accounts/logout/$', 'django_cas.views.logout', name='logout'), +) + +if settings.DEBUG: + urlpatterns += patterns('', + (r'^media/(?P.*)$', 'django.views.static.serve', {'document_root': settings.MEDIA_ROOT, 'show_indexes':True}), )