pong
[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
f5ca23b4 26 url(r'^api/pong/', include('auf.django.pong.urls')),
33379b93
EMS
27 url(r'^api/(?P<method>[a-z_-]+)/(?P<offre_id>\d+)/$',
28 'project.recrutement.api.api', name='recrutement_api'),
29 url(r'^api/(?P<method>[a-z_-]+)/$', 'project.recrutement.api.api',
30 name='recrutement_api'),
b1b7cca2
OL
31
32 url(r'^captcha/', include('captcha.urls'),
33 decorators=['auf.django.saml.decorators.login_required']),
34 url(r'^ajax_select/', include('ajax_select.urls'),
35 decorators=['auf.django.saml.decorators.login_required']),
36 url(r'^tinymce/', include('tinymce.urls'),
37 decorators=['auf.django.saml.decorators.login_required']),
38 url(r'^prive/(?P<filename>.*)$', 'project.views.piece',
39 decorators=['auf.django.saml.decorators.login_required']),
a16928b9 40
41 # apps
33379b93 42 url(r'^dae/', include('project.dae.urls'),
b1b7cca2 43 decorators=['auf.django.saml.decorators.login_required']),
33379b93 44 url(r'^recrutement/', include('project.recrutement.urls'),
b1b7cca2 45 decorators=['auf.django.saml.decorators.login_required']),
33379b93 46 url(r'^rh/', include('project.rh.urls'),
b1b7cca2 47 decorators=['auf.django.saml.decorators.login_required']),
361d53e1 48
b1b7cca2
OL
49 url(r'^qbe/', include('django_qbe.urls'),
50 decorators=['auf.django.saml.decorators.login_required']),
5e23d90d 51)
b1b7cca2
OL
52
53if not saml_settings.SAML_AUTH:
54 urlpatterns += patterns(
55 '',
56 (r'^', include('auf.django.saml.mellon_urls')),
57 )