pong
[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/pong/', include('auf.django.pong.urls')),
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'),
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']),
40
41 # apps
42 url(r'^dae/', include('project.dae.urls'),
43 decorators=['auf.django.saml.decorators.login_required']),
44 url(r'^recrutement/', include('project.recrutement.urls'),
45 decorators=['auf.django.saml.decorators.login_required']),
46 url(r'^rh/', include('project.rh.urls'),
47 decorators=['auf.django.saml.decorators.login_required']),
48
49 url(r'^qbe/', include('django_qbe.urls'),
50 decorators=['auf.django.saml.decorators.login_required']),
51 )
52
53 if not saml_settings.SAML_AUTH:
54 urlpatterns += patterns(
55 '',
56 (r'^', include('auf.django.saml.mellon_urls')),
57 )