calendrier dependances
[auf_savoirs_en_partage_django.git] / auf_savoirs_en_partage / urls.py
1 # -*- encoding: utf-8 -*-
2 from django.conf.urls.defaults import patterns, include, handler500, handler404, url
3 from django.conf import settings
4 from django.contrib import admin
5 from savoirs.rss import FilActualite, FilEvenement
6
7 admin.autodiscover()
8
9 handler500 = "views.page_500"
10 handler404 = "views.page_404"
11
12 site_feeds = {'actualites': FilActualite,
13 'agenda': FilEvenement }
14
15
16 urlpatterns = patterns(
17 '',
18
19 # traduction disponible dans le frontend sans permissons
20 url(r'^jsi18n/$', admin.site.i18n_javascript,),
21
22 url(r'^admin_tools/', include('admin_tools.urls')),
23 (r'^admin/', include(admin.site.urls)),
24 (r'^admin/confirmation/(.*)', 'savoirs.admin_views.confirmation'),
25 (r'^admin/assigner_pays', 'savoirs.admin_views.assigner_pays'),
26 (r'^admin/assigner_regions', 'savoirs.admin_views.assigner_regions'),
27 (r'^admin/assigner_thematiques', 'savoirs.admin_views.assigner_thematiques'),
28 (r'^admin/assigner_disciplines', 'savoirs.admin_views.assigner_disciplines'),
29 (r'^admin/(.*)', admin.site.root),
30
31 (r'^accounts/login/$', 'chercheurs.views.chercheur_login', {'template_name': 'accounts/login.html'}),
32 (r'^accounts/logout/$', 'django.contrib.auth.views.logout', {'template_name': 'accounts/logout.html'}),
33 (r'^accounts/change_password/$', 'chercheurs.views.change_password'),
34 (r'^accounts/send_password/$', 'chercheurs.views.send_password'),
35 (r'^accounts/new_password/(.+)/(.+)/$', 'chercheurs.views.new_password'),
36
37 # sous-menu gauche
38 (r'^$', 'savoirs.views.index'),
39
40 # sous-menu droite
41 (r'^a-propos/$', 'savoirs.views.a_propos'),
42 (r'^legal/$', 'savoirs.views.legal'),
43 (r'^nous-contacter/$', 'savoirs.views.nous_contacter'),
44
45 # recherche
46 (r'^recherche/$', 'savoirs.views.recherche'),
47 (r'^recherche/avancee/$', 'savoirs.views.avancee'),
48 (r'^recherche/conseils/$', 'savoirs.views.conseils'),
49
50 # ressources
51 (r'^ressources/$', 'savoirs.views.ressource_index'),
52 (r'^ressources/(?P<id>\d+)/$', 'savoirs.views.ressource_retrieve'),
53 (r'^informations/$', 'savoirs.views.informations'),
54
55 # actualités
56 (r'^actualites/$', 'savoirs.views.actualite_index'),
57
58 # agenda
59 (r'^agenda/$', 'savoirs.views.evenement_index'),
60 (r'^agenda/evenements/utilisation/$', 'savoirs.views.evenement_utilisation'),
61 (r'^agenda/evenements/creer/$', 'savoirs.views.evenement_ajout'),
62 (r'^agenda/evenements/moderer/$', 'savoirs.views.evenement_moderation'),
63 (r'^agenda/evenements/moderer/(.+)/accepter/$', 'savoirs.views.evenement_accepter'),
64 (r'^agenda/evenements/moderer/(.+)/refuser/$', 'savoirs.views.evenement_refuser'),
65 (r'^agenda/evenements/(.+)/$', 'savoirs.views.evenement'),
66
67 # chercheurs
68 (r'^chercheurs/$', 'chercheurs.views.index'),
69 (r'^chercheurs/(?P<id>\d+)/$', 'chercheurs.views.retrieve'),
70 (r'^chercheurs/inscription/$', 'chercheurs.views.inscription'),
71 (r'^chercheurs/perso/$', 'chercheurs.views.perso'),
72 (r'^chercheurs/edit/$', 'chercheurs.views.edit'),
73
74 # sites
75 (r'^sites/$', 'sitotheque.views.index'),
76 (r'^sites/(?P<id>\d+)/$', 'sitotheque.views.retrieve'),
77
78 (r'^rss/(.*)/$', 'django.contrib.syndication.views.feed', {'feed_dict':site_feeds}),
79 (r'^json/get/$', 'savoirs.views.json_get'),
80 (r'^json/set/$', 'savoirs.views.json_set'),
81
82 )
83
84 if settings.DEBUG:
85 urlpatterns += patterns('',
86 (r'^media/(?P<path>.*)$', 'django.views.static.serve',
87 {'document_root': settings.MEDIA_ROOT}),
88 )