Changé les questions relatives aux activités en Francophonie
[auf_savoirs_en_partage_django.git] / auf_savoirs_en_partage / urls.py
CommitLineData
f8c16b3d 1# -*- encoding: utf-8 -*-
1e28a70a 2from django.conf.urls.defaults import patterns, include, handler500, handler404, 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
1e28a70a 9handler500 = "views.page_500"
10handler404 = "views.page_404"
155a7c62 11
79b400f0 12site_feeds = {'actualites': FilActualite,
13 'agenda': FilEvenement }
37c3ba94 14
15
155a7c62
CR
16urlpatterns = patterns(
17 '',
713e8613 18
19 # traduction disponible dans le frontend sans permissons
20 url(r'^jsi18n/$', admin.site.i18n_javascript,),
21
6d885e0c 22 url(r'^admin_tools/', include('admin_tools.urls')),
23 (r'^admin/', include(admin.site.urls)),
2be148fe 24 (r'^admin/confirmation/(.*)', 'savoirs.admin_views.confirmation'),
e3c3296e 25 (r'^admin/assigner_pays', 'savoirs.admin_views.assigner_pays'),
e3c3296e 26 (r'^admin/assigner_thematiques', 'savoirs.admin_views.assigner_thematiques'),
264a3210
EMS
27 (r'^admin/(?P<app_name>[^/]*)/(?P<model_name>[^/]*)/assigner_regions', 'savoirs.admin_views.assigner_regions', {}, 'assigner_regions'),
28 (r'^admin/(?P<app_name>[^/]*)/(?P<model_name>[^/]*)/assigner_disciplines', 'savoirs.admin_views.assigner_disciplines', {}, 'assigner_disciplines'),
155a7c62 29 (r'^admin/(.*)', admin.site.root),
e3c3296e 30
51515982 31 (r'^accounts/login/$', 'chercheurs.views.chercheur_login'),
0e9597af 32 (r'^accounts/logout/$', 'django.contrib.auth.views.logout', {'template_name': 'accounts/logout.html'}),
e427f068 33 (r'^accounts/change_password/$', 'chercheurs.views.change_password'),
0e9597af
AJ
34 (r'^accounts/send_password/$', 'chercheurs.views.send_password'),
35 (r'^accounts/new_password/(.+)/(.+)/$', 'chercheurs.views.new_password'),
f24e513e 36
f8c16b3d 37 # sous-menu gauche
d15017b2 38 (r'^$', 'savoirs.views.index'),
f8c16b3d 39
40 # sous-menu droite
92c7413b 41 (r'^a-propos/$', 'savoirs.views.a_propos'),
e37563d1 42 (r'^legal/$', 'savoirs.views.legal'),
92c7413b 43 (r'^nous-contacter/$', 'savoirs.views.nous_contacter'),
f8c16b3d 44
45 # recherche
92c7413b 46 (r'^recherche/$', 'savoirs.views.recherche'),
932eef9a 47
f8c16b3d 48 # ressources
49 (r'^ressources/$', 'savoirs.views.ressource_index'),
91e0aefb 50 (r'^ressources/(?P<id>\d+)/$', 'savoirs.views.ressource_retrieve'),
f8c16b3d 51 (r'^informations/$', 'savoirs.views.informations'),
52
53 # actualités
54 (r'^actualites/$', 'savoirs.views.actualite_index'),
55
56 # agenda
57 (r'^agenda/$', 'savoirs.views.evenement_index'),
0b5b6fe0 58 (r'^agenda/evenements/utilisation/$', 'savoirs.views.evenement_utilisation'),
f8c16b3d 59 (r'^agenda/evenements/creer/$', 'savoirs.views.evenement_ajout'),
60 (r'^agenda/evenements/moderer/$', 'savoirs.views.evenement_moderation'),
61 (r'^agenda/evenements/moderer/(.+)/accepter/$', 'savoirs.views.evenement_accepter'),
62 (r'^agenda/evenements/moderer/(.+)/refuser/$', 'savoirs.views.evenement_refuser'),
63 (r'^agenda/evenements/(.+)/$', 'savoirs.views.evenement'),
64
65 # chercheurs
66 (r'^chercheurs/$', 'chercheurs.views.index'),
da091176 67 (r'^chercheurs/(?P<id>\d+)/$', 'chercheurs.views.retrieve'),
932eef9a 68 (r'^chercheurs/inscription/$', 'chercheurs.views.inscription'),
9af73c99 69 (r'^chercheurs/perso/$', 'chercheurs.views.perso'),
b3e1079e 70 (r'^chercheurs/edit/$', 'chercheurs.views.edit'),
d9885bf7 71 (r'^chercheurs/conversion$', 'chercheurs.views.conversion'),
9af73c99 72
f8c16b3d 73 # sites
bab65667
AJ
74 (r'^sites/$', 'sitotheque.views.index'),
75 (r'^sites/(?P<id>\d+)/$', 'sitotheque.views.retrieve'),
37c3ba94 76
0b1ddc11
EMS
77 # sites AUF
78 (r'^sites-auf/$', 'savoirs.views.sites_auf'),
79
37c3ba94 80 (r'^rss/(.*)/$', 'django.contrib.syndication.views.feed', {'feed_dict':site_feeds}),
f8c16b3d 81 (r'^json/get/$', 'savoirs.views.json_get'),
82 (r'^json/set/$', 'savoirs.views.json_set'),
37c3ba94 83
155a7c62
CR
84)
85
86if settings.DEBUG:
87 urlpatterns += patterns('',
88 (r'^media/(?P<path>.*)$', 'django.views.static.serve',
89 {'document_root': settings.MEDIA_ROOT}),
90 )