Gitlab CSE Unil

urls.py 1.3 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
Julien Furrer's avatar
Julien Furrer committed
5
6
7
8
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
9
10
admin.autodiscover()

Julien Furrer's avatar
Julien Furrer committed
11
urlpatterns = [
Julien Furrer's avatar
Julien Furrer committed
12
13
14
15
    # Examples:
    # url(r'^$', 'adim_project.views.home', name='home'),
    # url(r'^blog/', include('blog.urls')),

Julien Furrer's avatar
Julien Furrer committed
16
17
    # url(r'^admin/', include(admin.site.urls)),
    url(r'^s-412-5/admin/', include(admin.site.urls)),
18
    # url(r'^admin/', include('django_trap.urls', namespace='django_trap')),
Julien Furrer's avatar
Julien Furrer committed
19
20

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

    url(r'^api/', include('adim.urls')),
25
26
    url(r'^attp/', include('adim_ttp.urls')),

27
    url(r'^cimaf/', include('adim_env.cimaf.urls', namespace='adim.env.cimaf', app_name='adim_env')),
28
    url(r'^', include('adim_app.urls', namespace='adim.app', app_name='adim_app')),
Julien Furrer's avatar
Julien Furrer committed
29
]
Julien Furrer's avatar
Julien Furrer committed
30
31
32
33
34

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

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