1 |
111b2d34
|
Benjamin Dauvergne
|
from django.conf.urls import patterns, include, url
|
2 |
26cb36f6
|
Benjamin Dauvergne
|
from django.views.generic.simple import redirect_to
|
3 |
42670aa4
|
Jérôme Schneider
|
from django.contrib import admin
|
4 |
7b28c0b2
|
Benjamin Dauvergne
|
from django.contrib.auth.decorators import login_required
|
5 |
|
|
|
6 |
|
|
from urls_utils import decorated_includes
|
7 |
|
|
|
8 |
5c66ef04
|
Jérôme Schneider
|
from calebasse.api import EventResource, OccurrenceResource
|
9 |
1a622a74
|
Jérôme Schneider
|
|
10 |
42670aa4
|
Jérôme Schneider
|
admin.autodiscover()
|
11 |
111b2d34
|
Benjamin Dauvergne
|
|
12 |
1a622a74
|
Jérôme Schneider
|
event_resource = EventResource()
|
13 |
5c66ef04
|
Jérôme Schneider
|
occurrence_resource = OccurrenceResource()
|
14 |
1a622a74
|
Jérôme Schneider
|
|
15 |
e59e5bc3
|
Benjamin Dauvergne
|
service_patterns = patterns('',
|
16 |
26cb36f6
|
Benjamin Dauvergne
|
url(r'^$', 'calebasse.views.homepage', name='homepage'),
|
17 |
e59e5bc3
|
Benjamin Dauvergne
|
url(r'^agenda/', include('calebasse.agenda.urls')),
|
18 |
1097fd0a
|
Benjamin Dauvergne
|
url(r'^dossiers/', include('calebasse.dossiers.urls')),
|
19 |
|
|
url(r'^actes/', include('calebasse.actes.urls')),
|
20 |
e59e5bc3
|
Benjamin Dauvergne
|
url(r'^facturation/', include('calebasse.facturation.urls')),
|
21 |
1097fd0a
|
Benjamin Dauvergne
|
url(r'^personnes/', include('calebasse.personnes.urls')),
|
22 |
e59e5bc3
|
Benjamin Dauvergne
|
url(r'^ressources/', include('calebasse.ressources.urls')),
|
23 |
|
|
)
|
24 |
|
|
|
25 |
111b2d34
|
Benjamin Dauvergne
|
urlpatterns = patterns('',
|
26 |
|
|
# Examples:
|
27 |
333a39ca
|
Benjamin Dauvergne
|
# url(r'^calebasse/', include('aps42.foo.urls')),
|
28 |
111b2d34
|
Benjamin Dauvergne
|
|
29 |
|
|
# Uncomment the admin/doc line below to enable admin documentation:
|
30 |
|
|
# url(r'^admin/doc/', include('django.contrib.admindocs.urls')),
|
31 |
|
|
|
32 |
2e9ee32b
|
Benjamin Dauvergne
|
(r'^$', 'calebasse.views.redirect_to_homepage'),
|
33 |
42670aa4
|
Jérôme Schneider
|
url(r'^admin/', include(admin.site.urls)),
|
34 |
65103a73
|
Benjamin Dauvergne
|
url(r'^accounts/logout/', 'django.contrib.auth.views.logout_then_login'),
|
35 |
26cb36f6
|
Benjamin Dauvergne
|
url(r'^accounts/', include('django.contrib.auth.urls')),
|
36 |
5c66ef04
|
Jérôme Schneider
|
url(r'^api/',
|
37 |
|
|
decorated_includes(login_required, include(event_resource.urls))),
|
38 |
|
|
url(r'^api/',
|
39 |
|
|
decorated_includes(login_required, include(occurrence_resource.urls)),
|
40 |
|
|
),
|
41 |
7b28c0b2
|
Benjamin Dauvergne
|
url(r'^(?P<service>[a-z-]+)/', decorated_includes(login_required,
|
42 |
|
|
include(service_patterns))),
|
43 |
|
|
url(r'^lookups/', include('ajax_select.urls')),
|
44 |
111b2d34
|
Benjamin Dauvergne
|
)
|