Gitlab CSE Unil

urls.py 1.08 KB
Newer Older
Julien Furrer's avatar
Julien Furrer committed
1
from django.conf.urls import include, url, static
Julien Furrer's avatar
Julien Furrer committed
2
3
4
from django.conf import settings

from django.contrib import admin
M. Chardon's avatar
M. Chardon committed
5
6
from django.contrib.auth import views

Julien Furrer's avatar
Julien Furrer committed
7
8
9
10
admin.site.site_header = "ADIM - Site d'administration"
admin.site.site_title = "ADIM"
admin.site.index_title = "Administration"
admin.site.site_url = None
Julien Furrer's avatar
Julien Furrer committed
11
12
admin.autodiscover()

Julien Furrer's avatar
Julien Furrer committed
13
urlpatterns = [
Julien Furrer's avatar
Julien Furrer committed
14

Julien Furrer's avatar
Julien Furrer committed
15
    # url(r'^admin/', include(admin.site.urls)),
M. Chardon's avatar
M. Chardon committed
16
    url(r'^s-412-5/admin/', admin.site.urls),
Julien Furrer's avatar
Julien Furrer committed
17
18

    url(r'^shibauth/', include('shibauth.urls')),
M. Chardon's avatar
M. Chardon committed
19
20
    url(r'^accounts/login/$', views.login, {'template_name': "adim/home.html"}, name='django.contrib.auth.views.login'),
    url(r'^accounts/logout/$', views.logout, name='logout'),
Julien Furrer's avatar
Julien Furrer committed
21
22

    url(r'^api/', include('adim.urls')),
23
24
    url(r'^attp/', include('adim_ttp.urls')),

M. Chardon's avatar
M. Chardon committed
25
26
    url(r'^cimaf/', include('adim_env.cimaf.urls', namespace='adim.env.cimaf')),
    url(r'^', include('adim_app.urls', namespace="adim.app"))
Julien Furrer's avatar
Julien Furrer committed
27
]
Julien Furrer's avatar
Julien Furrer committed
28
29
30
31
32

handler404 = 'adim_app.views.handle_404'
handler400 = 'adim_app.views.handle_404'

if settings.DEBUG:
33
    urlpatterns += static.static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)