forked from benadida/helios-server
-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathurls.py
40 lines (34 loc) · 1.55 KB
/
urls.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# -*- coding: utf-8 -*-
from django.conf import settings
from django.conf.urls import url, include
from django.contrib import admin
from django.views.static import serve
from django.views.i18n import JavaScriptCatalog
js_info_dict = {
'packages': ('helios', 'helios_auth'),
}
admin.autodiscover()
urlpatterns = [
url(r'^auth/', include('helios_auth.urls')),
url(r'^helios/', include('helios.urls')),
url(r'^admin/', include(admin.site.urls)),
url(r'^jsi18n/$', JavaScriptCatalog.as_view(), name='i18n@JSCatalog'),
]
if settings.AUTH_DEFAULT_AUTH_SYSTEM == 'shibboleth':
urlpatterns += [
url(r'^', include('heliosinstitution.urls')),
]
else:
urlpatterns += [
url(r'^', include('server_ui.urls')),
]
if settings.DEBUG: # otherwise, they should be served by a webserver like apache
urlpatterns += [
# SHOULD BE REPLACED BY APACHE STATIC PATH
url(r'booth/(?P<path>.*)$', serve, {'document_root' : settings.ROOT_PATH + '/heliosbooth'}),
url(r'verifier/(?P<path>.*)$', serve, {'document_root' : settings.ROOT_PATH + '/heliosverifier'}),
url(r'static/auth/(?P<path>.*)$', serve, {'document_root' : settings.ROOT_PATH + '/helios_auth/media'}),
url(r'static/helios/(?P<path>.*)$', serve, {'document_root' : settings.ROOT_PATH + '/helios/media'}),
url(r'static/heliosinstitution/(?P<path>.*)$', serve, {'document_root' : settings.ROOT_PATH + '/heliosinstitution/media'}),
url(r'static/(?P<path>.*)$', serve, {'document_root' : settings.ROOT_PATH + '/server_ui/media'}),
]