texte de présentation agenda + conditions utilisation
[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 url(r'^admin_tools/', include('admin_tools.urls')),
19 (r'^admin/', include(admin.site.urls)),
20 (r'^admin/confirmation/(.*)', 'savoirs.admin_views.confirmation'),
21 (r'^admin/assigner_pays', 'savoirs.admin_views.assigner_pays'),
22 (r'^admin/assigner_regions', 'savoirs.admin_views.assigner_regions'),
23 (r'^admin/assigner_thematiques', 'savoirs.admin_views.assigner_thematiques'),
24 (r'^admin/assigner_disciplines', 'savoirs.admin_views.assigner_disciplines'),
25 (r'^admin/(.*)', admin.site.root),
26
27 (r'^accounts/login/$', 'chercheurs.views.chercheur_login', {'template_name': 'accounts/login.html'}),
28 (r'^accounts/logout/$', 'django.contrib.auth.views.logout', {'template_name': 'accounts/logout.html'}),
29 (r'^accounts/change_password/$', 'chercheurs.views.change_password'),
30 (r'^accounts/send_password/$', 'chercheurs.views.send_password'),
31 (r'^accounts/new_password/(.+)/(.+)/$', 'chercheurs.views.new_password'),
32
33 # sous-menu gauche
34 (r'^$', 'savoirs.views.index'),
35
36 # sous-menu droite
37 (r'^a-propos/$', 'savoirs.views.a_propos'),
38 (r'^legal/$', 'savoirs.views.legal'),
39 (r'^nous-contacter/$', 'savoirs.views.nous_contacter'),
40
41 # recherche
42 (r'^recherche/$', 'savoirs.views.recherche'),
43 (r'^recherche/avancee/$', 'savoirs.views.avancee'),
44 (r'^recherche/conseils/$', 'savoirs.views.conseils'),
45
46 # ressources
47 (r'^ressources/$', 'savoirs.views.ressource_index'),
48 (r'^ressources/(?P<id>\d+)/$', 'savoirs.views.ressource_retrieve'),
49 (r'^informations/$', 'savoirs.views.informations'),
50
51 # actualités
52 (r'^actualites/$', 'savoirs.views.actualite_index'),
53
54 # agenda
55 (r'^agenda/$', 'savoirs.views.evenement_index'),
56 (r'^agenda/evenements/utilisation/$', 'savoirs.views.evenement_utilisation'),
57 (r'^agenda/evenements/creer/$', 'savoirs.views.evenement_ajout'),
58 (r'^agenda/evenements/moderer/$', 'savoirs.views.evenement_moderation'),
59 (r'^agenda/evenements/moderer/(.+)/accepter/$', 'savoirs.views.evenement_accepter'),
60 (r'^agenda/evenements/moderer/(.+)/refuser/$', 'savoirs.views.evenement_refuser'),
61 (r'^agenda/evenements/(.+)/$', 'savoirs.views.evenement'),
62
63 # chercheurs
64 (r'^chercheurs/$', 'chercheurs.views.index'),
65 (r'^chercheurs/(?P<id>\d+)/$', 'chercheurs.views.retrieve'),
66 (r'^chercheurs/inscription/$', 'chercheurs.views.inscription'),
67 (r'^chercheurs/perso/$', 'chercheurs.views.perso'),
68 (r'^chercheurs/edit/$', 'chercheurs.views.edit'),
69
70 # sites
71 (r'^sites/$', 'sitotheque.views.index'),
72 (r'^sites/(?P<id>\d+)/$', 'sitotheque.views.retrieve'),
73
74 (r'^rss/(.*)/$', 'django.contrib.syndication.views.feed', {'feed_dict':site_feeds}),
75 (r'^json/get/$', 'savoirs.views.json_get'),
76 (r'^json/set/$', 'savoirs.views.json_set'),
77
78 )
79
80 if settings.DEBUG:
81 urlpatterns += patterns('',
82 (r'^media/(?P<path>.*)$', 'django.views.static.serve',
83 {'document_root': settings.MEDIA_ROOT}),
84 )