Project

General

Profile

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

calebasse / calebasse / urls.py @ 5c66ef04

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 EventResource, OccurrenceResource
9

    
10
admin.autodiscover()
11

    
12
event_resource = EventResource()
13
occurrence_resource = OccurrenceResource()
14

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

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

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

    
32
    (r'^$', redirect_to, { 'url': '/cmpp/' }),
33
    url(r'^admin/', include(admin.site.urls)),
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(occurrence_resource.urls)),
39
        ),
40
    url(r'^(?P<service>[a-z-]+)/', decorated_includes(login_required,
41
        include(service_patterns))),
42
    url(r'^lookups/', include('ajax_select.urls')),
43
)
(8-8/11)