Project

General

Profile

Download (1.46 KB) Statistics
| Branch: | Tag: | Revision:

calebasse / calebasse / personnes / urls.py @ 53647eb3

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'^(?P<pk>\d+)/editer/?$', 'edit_holiday', name = 'edit_holiday'),
14
    url(r'^(?P<pk>\d+)/supprimer/?$', 'delete_holiday', name = 'delete_holiday'),
15
    url(r'^ajouter/?$', 'create_holiday', name = 'create_holiday')
16
)
17

    
18
worker_patterns = patterns('calebasse.personnes.views',
19
    url(r'^$', 'worker_listing'),
20
    url(r'^new/$', 'worker_new'),
21
    url(r'^(?P<pk>\d+)/$', 'worker_update', name='worker_update'),
22
    url(r'^(?P<pk>\d+)/delete/$', 'worker_delete'),
23
    url(r'^(?P<pk>\d+)/(?P<weekday>\d)/$', 'worker_schedule_update'),
24
    url(r'^(?P<worker_pk>\d+)/holidays/', include(holiday_actions_paterns)),
25
)
26

    
27
holidays_patterns = patterns('calebasse.personnes.views',
28
    url(r'^$', 'holiday_listing'),
29
    url(r'^groupe/$', 'group_holiday_update',
30
        name='group-holiday-update'),
31
    )
32

    
33
urlpatterns = patterns('calebasse.personnes.views',
34
    url(r'^$', 'homepage'),
35
    url(r'^acces/', include(user_patterns)),
36
    url(r'^gestion/', include(worker_patterns)),
37
    url(r'^conges/', include(holidays_patterns)),
38
    url(r'^(?P<model_name>[a-z-]*)/', include(ressource_patterns)),
39
    )
(7-7/8)