dd06a52c8f2d6904f815ba9a779b709462ba8b68
[auf_rh_dae.git] / project / urls.py
1 # -*- encoding: utf-8 -*
2
3 from django.contrib import admin
4 from urldecorators.defaults import patterns, include, url
5 from urldecorators.defaults import handler500 # NOQA
6 from auf.django import permissions
7 from auf.django.saml import settings as saml_settings
8 from project.monkey import patch_ajax_selects
9
10 patch_ajax_selects()
11 admin.autodiscover()
12 permissions.autodiscover()
13
14
15 urlpatterns = patterns(
16 '',
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']),
24 (r'^admin/', include(admin.site.urls)),
25
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'),
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']),
39
40 # apps
41 url(r'^dae/', include('project.dae.urls'),
42 decorators=['auf.django.saml.decorators.login_required']),
43 url(r'^recrutement/', include('project.recrutement.urls'),
44 decorators=['auf.django.saml.decorators.login_required']),
45 url(r'^rh/', include('project.rh.urls'),
46 decorators=['auf.django.saml.decorators.login_required']),
47
48 url(r'^qbe/', include('django_qbe.urls'),
49 decorators=['auf.django.saml.decorators.login_required']),
50 )
51
52 if not saml_settings.SAML_AUTH:
53 urlpatterns += patterns(
54 '',
55 (r'^', include('auf.django.saml.mellon_urls')),
56 )