accueil : sites
[auf_savoirs_en_partage_django.git] / auf_savoirs_en_partage / urls.py
CommitLineData
f8c16b3d 1# -*- encoding: utf-8 -*-
6d885e0c 2from django.conf.urls.defaults import patterns, include, handler500, url
155a7c62
CR
3from django.conf import settings
4from django.contrib import admin
79b400f0 5from savoirs.rss import FilActualite, FilEvenement
5ecd5424 6
155a7c62
CR
7admin.autodiscover()
8
9handler500 # Pyflakes
10
79b400f0 11site_feeds = {'actualites': FilActualite,
12 'agenda': FilEvenement }
37c3ba94 13
14
155a7c62
CR
15urlpatterns = patterns(
16 '',
6d885e0c 17 url(r'^admin_tools/', include('admin_tools.urls')),
18 (r'^admin/', include(admin.site.urls)),
2be148fe 19 (r'^admin/confirmation/(.*)', 'savoirs.admin_views.confirmation'),
e3c3296e 20 (r'^admin/assigner_pays', 'savoirs.admin_views.assigner_pays'),
21 (r'^admin/assigner_regions', 'savoirs.admin_views.assigner_regions'),
22 (r'^admin/assigner_thematiques', 'savoirs.admin_views.assigner_thematiques'),
23 (r'^admin/assigner_disciplines', 'savoirs.admin_views.assigner_disciplines'),
155a7c62 24 (r'^admin/(.*)', admin.site.root),
e3c3296e 25
5ecd5424
CR
26 (r'^accounts/login/$', 'django.contrib.auth.views.login', {'template_name': 'savoirs/login.html'}),
27 (r'^accounts/logout/$', 'django.contrib.auth.views.logout', {'template_name': 'savoirs/logout.html'}),
f24e513e 28
f8c16b3d 29 # sous-menu gauche
d15017b2 30 (r'^$', 'savoirs.views.index'),
f8c16b3d 31
32 # sous-menu droite
92c7413b 33 (r'^a-propos/$', 'savoirs.views.a_propos'),
92c7413b 34 (r'^nous-contacter/$', 'savoirs.views.nous_contacter'),
f8c16b3d 35
36 # recherche
92c7413b
CR
37 (r'^recherche/$', 'savoirs.views.recherche'),
38 (r'^recherche/avancee/$', 'savoirs.views.avancee'),
f8c16b3d 39 (r'^recherche/conseils/$', 'savoirs.views.conseils'),
932eef9a 40
f8c16b3d 41 # ressources
42 (r'^ressources/$', 'savoirs.views.ressource_index'),
43 (r'^informations/$', 'savoirs.views.informations'),
44
45 # actualités
46 (r'^actualites/$', 'savoirs.views.actualite_index'),
47
48 # agenda
49 (r'^agenda/$', 'savoirs.views.evenement_index'),
50 (r'^agenda/evenements/creer/$', 'savoirs.views.evenement_ajout'),
51 (r'^agenda/evenements/moderer/$', 'savoirs.views.evenement_moderation'),
52 (r'^agenda/evenements/moderer/(.+)/accepter/$', 'savoirs.views.evenement_accepter'),
53 (r'^agenda/evenements/moderer/(.+)/refuser/$', 'savoirs.views.evenement_refuser'),
54 (r'^agenda/evenements/(.+)/$', 'savoirs.views.evenement'),
55
56 # chercheurs
57 (r'^chercheurs/$', 'chercheurs.views.index'),
da091176 58 (r'^chercheurs/(?P<id>\d+)/$', 'chercheurs.views.retrieve'),
932eef9a 59 (r'^chercheurs/inscription/$', 'chercheurs.views.inscription'),
9af73c99 60 (r'^chercheurs/perso/$', 'chercheurs.views.perso'),
b3e1079e 61 (r'^chercheurs/edit/$', 'chercheurs.views.edit'),
9af73c99 62
f8c16b3d 63 # sites
bab65667
AJ
64 (r'^sites/$', 'sitotheque.views.index'),
65 (r'^sites/(?P<id>\d+)/$', 'sitotheque.views.retrieve'),
37c3ba94 66
67 (r'^rss/(.*)/$', 'django.contrib.syndication.views.feed', {'feed_dict':site_feeds}),
f8c16b3d 68 (r'^json/get/$', 'savoirs.views.json_get'),
69 (r'^json/set/$', 'savoirs.views.json_set'),
37c3ba94 70
155a7c62
CR
71)
72
73if settings.DEBUG:
74 urlpatterns += patterns('',
75 (r'^media/(?P<path>.*)$', 'django.views.static.serve',
76 {'document_root': settings.MEDIA_ROOT}),
77 )