ensure all apps have login_required decorator
[auf_rh_dae.git] / project / urls.py
CommitLineData
5e23d90d 1# -*- encoding: utf-8 -*
974c38c1 2from urldecorators.defaults import patterns, include, handler500, handler404, url
5e23d90d
OL
3from django.conf import settings
4from django.contrib import admin
8e0d552d 5from auf.django.emploi import settings as sett
5e23d90d 6
c3f0b49f
EMS
7from auf.django import permissions
8
5e23d90d 9admin.autodiscover()
c3f0b49f 10permissions.autodiscover()
5e23d90d
OL
11
12handler500 # Pyflakes
13
14urlpatterns = patterns(
15 '',
fd5f1d55 16 (r'^$', 'project.views.index'),
5e23d90d
OL
17 url(r'^admin_tools/', include('admin_tools.urls')),
18 (r'^admin/', include(admin.site.urls)),
c2141437 19 url(r'^api/(?P<method>[a-z_-]+)/(?P<offre_id>\d+)/$', 'recrutement.api.api',
43198a9f 20 name='recrutement_api'),
8e0f904f
NBV
21 url(r'^api/(?P<method>[a-z_-]+)/$', 'recrutement.api.api',
22 name='recrutement_api'),
5e23d90d
OL
23 (r'^connexion/$', 'django.contrib.auth.views.login'),
24 (r'^deconnexion/$', 'django.contrib.auth.views.logout'),
a16928b9 25 #url(r'^private_files/', include('private_files.urls')),
26 url(r'^captcha/', include('captcha.urls')),
a16928b9 27 (r'^tinymce/', include('tinymce.urls')),
28 (r'^prive/(?P<path>.*)$', 'django.views.static.serve',
29 {'document_root': settings.PRIVE_MEDIA_ROOT}),
30
31 # apps
974c38c1
OL
32 url(r'^dae/', include('project.dae.urls'), decorators=['django.contrib.auth.decorators.login_required']),
33 url(r'^recrutement/', include('recrutement.urls'), decorators=['django.contrib.auth.decorators.login_required']),
34 url(r'^rh/', include('project.rh.urls'), decorators=['django.contrib.auth.decorators.login_required']),
5e23d90d
OL
35)
36
37if settings.DEBUG:
38 urlpatterns += patterns('',
39 (r'^media/(?P<path>.*)$', 'django.views.static.serve',
40 {'document_root': settings.MEDIA_ROOT}),
41 )