1
|
from django.conf.urls import patterns, url, include
|
2
|
from calebasse.ressources.urls import ressource_patterns
|
3
|
|
4
|
|
5
|
user_patterns = patterns('calebasse.personnes.views',
|
6
|
url(r'^$', 'user_listing'),
|
7
|
url(r'^new/$', 'user_new'),
|
8
|
url(r'^(?P<pk>\d+)/$', 'user_update'),
|
9
|
url(r'^(?P<pk>\d+)/delete/$', 'user_delete'),
|
10
|
)
|
11
|
|
12
|
holiday_actions_paterns = patterns('calebasse.personnes.views',
|
13
|
url(r'^$', 'worker_holidays_update', name = 'worker-holidays-update'),
|
14
|
url(r'^(?P<pk>\d+)/editer/?$', 'edit_holiday', name = 'edit_holiday'),
|
15
|
url(r'^(?P<pk>\d+)/supprimer/?$', 'delete_holiday', name = 'delete_holiday'),
|
16
|
url(r'^ajouter/?$', 'create_holiday', name = 'create_holiday')
|
17
|
)
|
18
|
|
19
|
worker_patterns = patterns('calebasse.personnes.views',
|
20
|
url(r'^$', 'worker_listing'),
|
21
|
url(r'^new/$', 'worker_new'),
|
22
|
url(r'^(?P<pk>\d+)/$', 'worker_update', name='worker_update'),
|
23
|
url(r'^(?P<pk>\d+)/delete/$', 'worker_delete'),
|
24
|
url(r'^(?P<pk>\d+)/(?P<weekday>\d)/$', 'worker_schedule_update'),
|
25
|
url(r'^(?P<worker_pk>\d+)/holidays/', include(holiday_actions_paterns)),
|
26
|
)
|
27
|
|
28
|
holidays_patterns = patterns('calebasse.personnes.views',
|
29
|
url(r'^$', 'holiday_listing'),
|
30
|
# url(r'^groupe/$', 'group_holiday_update',
|
31
|
# name='group-holiday-update'),
|
32
|
url(r'^groupe/$', 'group_holidays', name = 'group-holidays'),
|
33
|
url(r'^groupe/ajouter/?$', 'create_group_holiday', name = 'create-group-holiday'),
|
34
|
url(r'^groupe/(?P<pk>\d+)/editer/?$', 'edit_group_holiday', name = 'edit-group-holiday'),
|
35
|
url(r'^groupe/(?P<pk>\d+)/supprimer/?$', 'delete_group_holiday', name = 'delete-group-holiday'),
|
36
|
)
|
37
|
|
38
|
urlpatterns = patterns('calebasse.personnes.views',
|
39
|
url(r'^$', 'homepage'),
|
40
|
url(r'^acces/', include(user_patterns)),
|
41
|
url(r'^gestion/', include(worker_patterns)),
|
42
|
url(r'^conges/', include(holidays_patterns)),
|
43
|
url(r'^(?P<model_name>[a-z-]*)/', include(ressource_patterns)),
|
44
|
)
|