ferme #503, rss agenda et intégration frontend
[auf_savoirs_en_partage_django.git] / auf_savoirs_en_partage / urls.py
1 from django.conf.urls.defaults import patterns, include, handler500, url
2 from django.conf import settings
3 from django.contrib import admin
4 from savoirs.rss import FilActualite, FilEvenement
5
6 admin.autodiscover()
7
8 handler500 # Pyflakes
9
10 site_feeds = {'actualites': FilActualite,
11 'agenda': FilEvenement }
12
13
14 urlpatterns = patterns(
15 '',
16 url(r'^admin_tools/', include('admin_tools.urls')),
17 (r'^admin/', include(admin.site.urls)),
18 (r'^admin/confirmation/(.*)', 'savoirs.admin_views.confirmation'),
19 (r'^admin/assigner_pays', 'savoirs.admin_views.assigner_pays'),
20 (r'^admin/assigner_regions', 'savoirs.admin_views.assigner_regions'),
21 (r'^admin/assigner_thematiques', 'savoirs.admin_views.assigner_thematiques'),
22 (r'^admin/assigner_disciplines', 'savoirs.admin_views.assigner_disciplines'),
23 (r'^admin/(.*)', admin.site.root),
24
25 (r'^accounts/login/$', 'django.contrib.auth.views.login', {'template_name': 'savoirs/login.html'}),
26 (r'^accounts/logout/$', 'django.contrib.auth.views.logout', {'template_name': 'savoirs/logout.html'}),
27
28 (r'^$', 'savoirs.views.index'),
29 (r'^conseils/$', 'savoirs.views.conseils'),
30 (r'^a-propos/$', 'savoirs.views.a_propos'),
31 (r'^informations/$', 'savoirs.views.informations'),
32 (r'^nous-contacter/$', 'savoirs.views.nous_contacter'),
33 (r'^recherche/$', 'savoirs.views.recherche'),
34 (r'^recherche/avancee/$', 'savoirs.views.avancee'),
35
36 (r'^evenements/creer/$', 'savoirs.views.evenement_ajout'),
37 (r'^evenements/moderer/$', 'savoirs.views.evenement_moderation'),
38 (r'^evenements/moderer/(.+)/accepter/$', 'savoirs.views.evenement_accepter'),
39 (r'^evenements/moderer/(.+)/refuser/$', 'savoirs.views.evenement_refuser'),
40 (r'^evenements/(.+)/$', 'savoirs.views.evenement'),
41
42 (r'^json/get/$', 'savoirs.views.json_get'),
43 (r'^json/set/$', 'savoirs.views.json_set'),
44
45 (r'^chercheurs/(?P<id>\d+)/$', 'chercheurs.views.retrieve'),
46 (r'^chercheurs/inscription/$', 'chercheurs.views.inscription'),
47 (r'^chercheurs/repertoire/$', 'chercheurs.views.repertoire'),
48 (r'^chercheurs/perso/$', 'chercheurs.views.perso'),
49 (r'^chercheurs/edit/$', 'chercheurs.views.edit'),
50
51 (r'^sites/$', 'sitotheque.views.index'),
52 (r'^sites/(?P<id>\d+)/$', 'sitotheque.views.retrieve'),
53
54 (r'^rss/(.*)/$', 'django.contrib.syndication.views.feed', {'feed_dict':site_feeds}),
55
56 )
57
58 if settings.DEBUG:
59 urlpatterns += patterns('',
60 (r'^media/(?P<path>.*)$', 'django.views.static.serve',
61 {'document_root': settings.MEDIA_ROOT}),
62 )