5638
[auf_rh_dae.git] / project / urls.py
CommitLineData
5e23d90d 1# -*- encoding: utf-8 -*
5e23d90d 2
75f0e87b 3from django.contrib import admin
33379b93
EMS
4from urldecorators.defaults import patterns, include, url
5from urldecorators.defaults import handler500 # NOQA
c3f0b49f 6from auf.django import permissions
b1b7cca2 7from auf.django.saml import settings as saml_settings
33379b93 8from project.monkey import patch_ajax_selects
c3f0b49f 9
33379b93 10patch_ajax_selects()
5e23d90d 11admin.autodiscover()
c3f0b49f 12permissions.autodiscover()
5e23d90d 13
5e23d90d
OL
14
15urlpatterns = patterns(
16 '',
b1b7cca2
OL
17 url(r'^$', 'project.views.index', name='index',
18 decorators=['auf.django.saml.decorators.login_required']),
19
20 url(r'^', include('auf.django.saml.urls')),
21
22 url(r'^admin_tools/', include('admin_tools.urls'),
23 decorators=['auf.django.saml.decorators.login_required']),
5e23d90d 24 (r'^admin/', include(admin.site.urls)),
b1b7cca2 25
33379b93
EMS
26 url(r'^api/(?P<method>[a-z_-]+)/(?P<offre_id>\d+)/$',
27 'project.recrutement.api.api', name='recrutement_api'),
28 url(r'^api/(?P<method>[a-z_-]+)/$', 'project.recrutement.api.api',
29 name='recrutement_api'),
b1b7cca2
OL
30
31 url(r'^captcha/', include('captcha.urls'),
32 decorators=['auf.django.saml.decorators.login_required']),
33 url(r'^ajax_select/', include('ajax_select.urls'),
34 decorators=['auf.django.saml.decorators.login_required']),
35 url(r'^tinymce/', include('tinymce.urls'),
36 decorators=['auf.django.saml.decorators.login_required']),
37 url(r'^prive/(?P<filename>.*)$', 'project.views.piece',
38 decorators=['auf.django.saml.decorators.login_required']),
a16928b9 39
40 # apps
33379b93 41 url(r'^dae/', include('project.dae.urls'),
b1b7cca2 42 decorators=['auf.django.saml.decorators.login_required']),
33379b93 43 url(r'^recrutement/', include('project.recrutement.urls'),
b1b7cca2 44 decorators=['auf.django.saml.decorators.login_required']),
33379b93 45 url(r'^rh/', include('project.rh.urls'),
b1b7cca2 46 decorators=['auf.django.saml.decorators.login_required']),
361d53e1 47
b1b7cca2
OL
48 url(r'^qbe/', include('django_qbe.urls'),
49 decorators=['auf.django.saml.decorators.login_required']),
5e23d90d 50)
b1b7cca2
OL
51
52if not saml_settings.SAML_AUTH:
53 urlpatterns += patterns(
54 '',
55 (r'^', include('auf.django.saml.mellon_urls')),
56 )