1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
from django.conf import settings
from django.conf.urls.defaults import *
from django.contrib import admin
from identityprovider.decorators import check_readonly
admin.autodiscover()
handler500 = 'identityprovider.views.errors.server_error'
handler404 = 'identityprovider.views.errors.page_not_found'
urlpatterns = patterns('',
(r'^admin/(.*)', check_readonly(admin.site.root)),
(r'^', include('identityprovider.urls')),
)
if settings.SERVE_STATIC_MEDIA:
urlpatterns += patterns('',
(r'assets/identityprovider/(.*)', 'django.views.static.serve',
{'document_root': settings.SSO_MEDIA_ROOT}),
(r'media/(.*)', 'django.views.static.serve',
{'document_root': settings.MEDIA_ROOT}),
)
|