Export de chercheurs CSV et ODS
[auf_savoirs_en_partage_django.git] / auf_savoirs_en_partage / urls.py
CommitLineData
f8c16b3d 1# -*- encoding: utf-8 -*-
bae03b7b 2
1e28a70a 3from django.conf.urls.defaults import patterns, include, handler500, handler404, url
155a7c62
CR
4from django.conf import settings
5from django.contrib import admin
011804bb 6from savoirs.rss import FilActualite, FilEvenement, FilAppels
5ecd5424 7
155a7c62
CR
8admin.autodiscover()
9
1e28a70a 10handler500 = "views.page_500"
11handler404 = "views.page_404"
155a7c62 12
79b400f0 13site_feeds = {'actualites': FilActualite,
011804bb
EMS
14 'agenda': FilEvenement,
15 'appels': FilAppels
16 }
37c3ba94 17
18
bae03b7b
EMS
19# Les URLs suivantes peuvent être préfixées de la discipline et/ou la
20# région. Nous les regroupons donc dans un module qu'on incluera plus bas.
21sep_patterns = patterns(
155a7c62 22 '',
713e8613 23
bae03b7b 24 # accueil
2af3293d 25 (r'^$', 'savoirs.views.index', {}, 'accueil'),
f24e513e 26
f8c16b3d 27 # recherche
92c7413b 28 (r'^recherche/$', 'savoirs.views.recherche'),
f0692c02
EMS
29)
30
31urlpatterns = sep_patterns + patterns(
32 '',
33
34 (r'^informations/$', 'savoirs.views.informations'),
35
36 # agenda
2af3293d 37 (r'^agenda/$', 'savoirs.views.evenement_index', {}, 'agenda'),
f0692c02
EMS
38 (r'^agenda/evenements/(?P<id>\d+)/$', 'savoirs.views.evenement'),
39 (r'^agenda/evenements/moderer/$', 'savoirs.views.evenement_moderation'),
40 (r'^agenda/evenements/moderer/(.+)/accepter/$', 'savoirs.views.evenement_accepter'),
41 (r'^agenda/evenements/moderer/(.+)/refuser/$', 'savoirs.views.evenement_refuser'),
f09bc1c6 42 (r'^agenda/evenements/utilisation/$', 'savoirs.views.page_statique', dict(id='conditions-agenda'), 'conditions-agenda'),
2af3293d 43 (r'^agenda/evenements/creer/$', 'savoirs.views.evenement_ajout', {}, 'evenement-ajout'),
1719bf4e 44 (r'^agenda/evenements/creer/options_fuseau_horaire/$', 'savoirs.views.options_fuseau_horaire'),
f0692c02
EMS
45
46 # sous-menu droite
f09bc1c6
EMS
47 (r'^a-propos/$', 'savoirs.views.page_statique', dict(id='a-propos'), 'a-propos'),
48 (r'^aide/$', 'savoirs.views.page_statique', dict(id='aide'), 'aide'),
49 (r'^domaines-de-recherche/$', 'savoirs.views.page_statique', dict(id='domaines-de-recherche'), 'domaines-de-recherche'),
50 (r'^legal/$', 'savoirs.views.page_statique', dict(id='legal'), 'legal'),
51 (r'^nous-contacter/$', 'savoirs.views.page_statique', dict(id='contact'), 'contact'),
c1b134f8 52
f8c16b3d 53 # ressources
2af3293d 54 (r'^ressources/$', 'savoirs.views.ressource_index', {}, 'ressources'),
91e0aefb 55 (r'^ressources/(?P<id>\d+)/$', 'savoirs.views.ressource_retrieve'),
f0692c02 56
f8c16b3d 57 # actualités
011804bb
EMS
58 (r'^actualites/$', 'savoirs.views.actualite_index', {}, 'actualites'),
59 (r'^actualites/(?P<id>\d+)/$', 'savoirs.views.actualite', {}, 'actualite'),
60 (r'^appels/$', 'savoirs.views.actualite_index', dict(type='appels'), 'appels'),
c1b134f8 61
f0692c02 62 # sites
2af3293d 63 (r'^sites/$', 'sitotheque.views.index', {}, 'sites'),
f0692c02 64 (r'^sites/(?P<id>\d+)/$', 'sitotheque.views.retrieve'),
fc2908e4 65 (r'^sites/google.xml$', 'sitotheque.views.config_google'),
f0692c02
EMS
66
67 # sites AUF
2af3293d 68 (r'^sites-auf/$', 'savoirs.views.sites_auf', {}, 'sites-auf'),
f8c16b3d 69
70 # chercheurs
2af3293d 71 (r'^chercheurs/$', 'chercheurs.views.index', {}, 'chercheurs'),
da091176 72 (r'^chercheurs/(?P<id>\d+)/$', 'chercheurs.views.retrieve'),
2af3293d 73 (r'^chercheurs/inscription/$', 'chercheurs.views.inscription', {}, 'inscription'),
43ed73e7
EMS
74 (r'^chercheurs/inscription_faite/$', 'django.views.generic.simple.direct_to_template', dict(
75 template='chercheurs/inscription_faite.html'
76 ), 'chercheurs-inscription-faite'),
77 (r'^chercheurs/activation/(?P<id_base36>.*)/(?P<token>.*)/$', 'chercheurs.views.activation', {}, 'chercheurs-activation'),
8baa2a56 78 (r'^chercheurs/desinscription/$', 'chercheurs.views.desinscription'),
9af73c99 79 (r'^chercheurs/perso/$', 'chercheurs.views.perso'),
b3e1079e 80 (r'^chercheurs/edit/$', 'chercheurs.views.edit'),
f09bc1c6 81 (r'^chercheurs/conversion$', 'savoirs.views.page_statique', dict(id='table-de-passage'), 'conversion'),
fa6a2a07 82 (r'^chercheurs/connexion/$', 'chercheurs.views.login', dict(
d4736474
EMS
83 template_name='chercheurs/login.html'
84 ), 'chercheurs-login'),
85 (r'^chercheurs/deconnexion/$', 'django.contrib.auth.views.logout', dict(
86 template_name='chercheurs/logged_out.html'
87 ), 'chercheurs-logout'),
88 (r'^chercheurs/changement-mdp/$', 'django.contrib.auth.views.password_change', dict(
89 template_name='chercheurs/password_change_form.html',
90 post_change_redirect='/chercheurs/changement-mdp-fini/'
91 ), 'chercheurs-password-change'),
92 (r'^chercheurs/changement-mdp-fini/$', 'django.contrib.auth.views.password_change_done', dict(
93 template_name='chercheurs/password_change_done.html'
94 ), 'chercheurs-password-change-done'),
95 (r'^chercheurs/oubli-mdp/$', 'django.contrib.auth.views.password_reset', dict(
96 template_name='chercheurs/password_reset_form.html',
97 email_template_name='chercheurs/password_reset_email.txt',
98 post_reset_redirect='/chercheurs/oubli-mdp-envoye/'
99 ), 'chercheurs-password-reset'),
100 (r'^chercheurs/oubli-mdp-envoye/$', 'django.contrib.auth.views.password_reset_done', dict(
101 template_name='chercheurs/password_reset_done.html'
102 ), 'chercheurs-password-reset-done'),
103 (r'^chercheurs/oubli-mdp-retour/(?P<uidb36>.*)/(?P<token>.*)/$', 'django.contrib.auth.views.password_reset_confirm', dict(
104 template_name='chercheurs/password_reset_confirm.html'
105 ), 'chercheurs-password-reset-confirm'),
106 (r'^chercheurs/oubli-mdp-fini/$', 'django.contrib.auth.views.password_reset_complete', dict(
107 template_name='chercheurs/password_reset_complete.html'
108 )),
219710da 109 (r'^etablissements/autocomplete/$', 'chercheurs.views.etablissements_autocomplete'),
e836f6f7 110 (r'^etablissements/autocomplete/(?P<pays>.*)/$', 'chercheurs.views.etablissements_autocomplete'),
9af73c99 111
bae03b7b
EMS
112 # section par discipline et/ou région
113 (r'^discipline/(?P<discipline>\d+)/', include(sep_patterns)),
114 (r'^region/(?P<region>\d+)/', include(sep_patterns)),
115 (r'^discipline/(?P<discipline>\d+)/region/(?P<region>\d+)/', include(sep_patterns)),
116
117 # traduction disponible dans le frontend sans permissons
118 url(r'^jsi18n/$', admin.site.i18n_javascript,),
119
120 url(r'^admin_tools/', include('admin_tools.urls')),
121 (r'^admin/', include(admin.site.urls)),
122 (r'^admin/confirmation/(.*)', 'savoirs.admin_views.confirmation'),
123 (r'^admin/assigner_pays', 'savoirs.admin_views.assigner_pays'),
124 (r'^admin/assigner_thematiques', 'savoirs.admin_views.assigner_thematiques'),
125 (r'^admin/(?P<app_name>[^/]*)/(?P<model_name>[^/]*)/assigner_regions', 'savoirs.admin_views.assigner_regions', {}, 'assigner_regions'),
126 (r'^admin/(?P<app_name>[^/]*)/(?P<model_name>[^/]*)/assigner_disciplines', 'savoirs.admin_views.assigner_disciplines', {}, 'assigner_disciplines'),
127 (r'^admin/(.*)', admin.site.root),
128
bae03b7b 129
bae03b7b 130 # rss
37c3ba94 131 (r'^rss/(.*)/$', 'django.contrib.syndication.views.feed', {'feed_dict':site_feeds}),
f8c16b3d 132 (r'^json/get/$', 'savoirs.views.json_get'),
133 (r'^json/set/$', 'savoirs.views.json_set'),
1719bf4e 134
155a7c62
CR
135)
136
137if settings.DEBUG:
138 urlpatterns += patterns('',
139 (r'^media/(?P<path>.*)$', 'django.views.static.serve',
140 {'document_root': settings.MEDIA_ROOT}),
141 )