Project

General

Profile

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

calebasse / calebasse / urls.py @ 76974b6f

1
from django.conf.urls import patterns, include, url
2
from django.views.generic.simple import redirect_to
3
from django.contrib import admin
4
from django.contrib.auth.decorators import login_required
5

    
6
from urls_utils import decorated_includes
7

    
8
from calebasse.api import (event_resource,
9
        patientrecord_resource, patientaddress_ressource)
10

    
11
admin.autodiscover()
12

    
13

    
14
service_patterns = patterns('',
15
    url(r'^$', 'calebasse.views.homepage', name='homepage'),
16
    url(r'^agenda/', include('calebasse.agenda.urls')),
17
    url(r'^dossiers/', include('calebasse.dossiers.urls')),
18
    url(r'^actes/', include('calebasse.actes.urls')),
19
    url(r'^facturation/', include('calebasse.facturation.urls')),
20
    url(r'^personnes/', include('calebasse.personnes.urls')),
21
    url(r'^ressources/', include('calebasse.ressources.urls')),
22
)
23

    
24
urlpatterns = patterns('',
25
    # Examples:
26
    # url(r'^calebasse/', include('aps42.foo.urls')),
27

    
28
    # Uncomment the admin/doc line below to enable admin documentation:
29
    # url(r'^admin/doc/', include('django.contrib.admindocs.urls')),
30

    
31
    (r'^$', 'calebasse.views.redirect_to_homepage'),
32
    url(r'^admin/', include(admin.site.urls)),
33
    url(r'^accounts/logout/', 'django.contrib.auth.views.logout_then_login'),
34
    url(r'^accounts/', include('django.contrib.auth.urls')),
35
    url(r'^api/',
36
        decorated_includes(login_required, include(event_resource.urls))),
37
    url(r'^api/',
38
        decorated_includes(login_required, include(patientrecord_resource.urls)),
39
        ),
40
    url(r'^api/',
41
        decorated_includes(login_required, include(patientaddress_ressource.urls)),
42
        ),
43
    url(r'^(?P<service>[a-z-]+)/', decorated_includes(login_required,
44
        include(service_patterns))),
45
    url(r'^lookups/', include('ajax_select.urls')),
46
)
(9-9/13)