X-Git-Url: https://git.mdrn.pl/audio.git/blobdiff_plain/eee35e00bf0d0eb3d2a9f08f72c7052962fecbf6..09c7e92db4f6c0e94f8686a94bbfaa6896b0290c:/src/audiobooks/urls.py diff --git a/src/audiobooks/urls.py b/src/audiobooks/urls.py index f3113c8..eb198b0 100644 --- a/src/audiobooks/urls.py +++ b/src/audiobooks/urls.py @@ -1,21 +1,18 @@ from django.conf import settings -from django.conf.urls import patterns, include, url +from django.conf.urls import include, url from django.views.generic import RedirectView +import django_cas.views # Uncomment the next two lines to enable the admin: from django.contrib import admin admin.autodiscover() -urlpatterns = patterns('', - url(r'^$', RedirectView.as_view(url='archive/')), +urlpatterns = [ + url(r'^$', RedirectView.as_view(url='archive/', permanent=False)), url(r'^archive/', include('archive.urls')), + url(r'^publish/', include('apiclient.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}), -) + url(r'^accounts/login/$', django_cas.views.login, name='login'), + url(r'^accounts/logout/$', django_cas.views.logout, name='logout'), +]