5e9f2f68c3d8650fced25906fafe58cff1696078
[auf_rh_dae.git] / project / urls.py
1 # -*- encoding: utf-8 -*
2 from django.conf.urls.defaults import patterns, include, handler500, url
3 from django.conf import settings
4 from django.contrib import admin
5 from auf.django.emploi import settings as sett
6
7 admin.autodiscover()
8
9 handler500 # Pyflakes
10
11 urlpatterns = patterns(
12 '',
13 # système
14 url(r'^$', 'project.views.accueil', name='accueil'),
15
16 (r'^admin/', include(admin.site.urls)),
17 url(r'^api/(?P<method>[a-z_-]+)/(?P<offre_id>\d+)/$', 'recrutement.api.api',
18 name='recrutement_api'),
19 url(r'^api/(?P<method>[a-z_-]+)/$', 'recrutement.api.api',
20 name='recrutement_api'),
21 (r'^connexion/$', 'django.contrib.auth.views.login'),
22 (r'^deconnexion/$', 'django.contrib.auth.views.logout'),
23 #url(r'^private_files/', include('private_files.urls')),
24 url(r'^captcha/', include('captcha.urls')),
25 url(r'^admin_tools/', include('admin_tools.urls')),
26 (r'^tinymce/', include('tinymce.urls')),
27 (r'^prive/(?P<path>.*)$', 'django.views.static.serve',
28 {'document_root': settings.PRIVE_MEDIA_ROOT}),
29 url(r'^404$', 'project.views.erreur404', name='404'),
30 url(r'^500$', 'project.views.erreur500', name='500'),
31 url(r'^550$', 'project.views.erreur550', name='550'),
32
33 # apps
34 (r'^dae/', include('project.dae.urls')),
35 (r'^recrutement/', include('recrutement.urls')),
36 (r'^', include('project.rh.urls')),
37 )
38
39 if settings.DEBUG:
40 urlpatterns += patterns('',
41 (r'^media/(?P<path>.*)$', 'django.views.static.serve',
42 {'document_root': settings.MEDIA_ROOT}),
43 )