Gitlab CSE Unil

urls.py 913 Bytes
Newer Older
Julien Furrer's avatar
Julien Furrer committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
from django.conf.urls import patterns, include, url, static
from django.conf import settings

from django.contrib import admin
admin.autodiscover()

urlpatterns = patterns('',
    # Examples:
    # url(r'^$', 'adim_project.views.home', name='home'),
    # url(r'^blog/', include('blog.urls')),

    url(r'^admin/', include(admin.site.urls)),

    url(r'^shibauth/', include('shibauth.urls')),
    url(r'^accounts/login/$', 'django.contrib.auth.views.login', {'template_name': "adim_app/home.html"}),
    url(r'^accounts/logout/$', 'django.contrib.auth.views.logout_then_login', name="logout"),

    url(r'^api/', include('adim.urls')),
19
    url(r'^', include('adim_app.urls', namespace='adim.app', app_name='adim_app')),
Julien Furrer's avatar
Julien Furrer committed
20
21
22
23
24
25
)

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

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