Agrandi certaines tailles de polices.
[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
79b400f0 6from savoirs.rss import FilActualite, FilEvenement
5ecd5424 7
155a7c62
CR
8admin.autodiscover()
9
1e28a70a 10handler500 = "views.page_500"
11handler404 = "views.page_404"
155a7c62 12
79b400f0 13site_feeds = {'actualites': FilActualite,
14 'agenda': FilEvenement }
37c3ba94 15
16
bae03b7b
EMS
17# Les URLs suivantes peuvent être préfixées de la discipline et/ou la
18# région. Nous les regroupons donc dans un module qu'on incluera plus bas.
19sep_patterns = patterns(
155a7c62 20 '',
713e8613 21
bae03b7b
EMS
22 # accueil
23 (r'^$', 'savoirs.views.index'),
f24e513e 24
f8c16b3d 25 # recherche
92c7413b 26 (r'^recherche/$', 'savoirs.views.recherche'),
f0692c02
EMS
27)
28
29urlpatterns = sep_patterns + patterns(
30 '',
31
32 (r'^informations/$', 'savoirs.views.informations'),
33
34 # agenda
35 (r'^agenda/$', 'savoirs.views.evenement_index'),
36 (r'^agenda/evenements/(?P<id>\d+)/$', 'savoirs.views.evenement'),
37 (r'^agenda/evenements/moderer/$', 'savoirs.views.evenement_moderation'),
38 (r'^agenda/evenements/moderer/(.+)/accepter/$', 'savoirs.views.evenement_accepter'),
39 (r'^agenda/evenements/moderer/(.+)/refuser/$', 'savoirs.views.evenement_refuser'),
40
41 # sous-menu droite
42 (r'^a-propos/$', 'savoirs.views.a_propos'),
43 (r'^legal/$', 'savoirs.views.legal'),
44 (r'^nous-contacter/$', 'savoirs.views.nous_contacter'),
c1b134f8 45
f8c16b3d 46 # ressources
47 (r'^ressources/$', 'savoirs.views.ressource_index'),
91e0aefb 48 (r'^ressources/(?P<id>\d+)/$', 'savoirs.views.ressource_retrieve'),
f0692c02 49
f8c16b3d 50 # actualités
51 (r'^actualites/$', 'savoirs.views.actualite_index'),
c1b134f8 52
f0692c02
EMS
53 # sites
54 (r'^sites/$', 'sitotheque.views.index'),
55 (r'^sites/(?P<id>\d+)/$', 'sitotheque.views.retrieve'),
56
57 # sites AUF
58 (r'^sites-auf/$', 'savoirs.views.sites_auf'),
f8c16b3d 59
60 # chercheurs
61 (r'^chercheurs/$', 'chercheurs.views.index'),
da091176 62 (r'^chercheurs/(?P<id>\d+)/$', 'chercheurs.views.retrieve'),
932eef9a 63 (r'^chercheurs/inscription/$', 'chercheurs.views.inscription'),
8baa2a56 64 (r'^chercheurs/desinscription/$', 'chercheurs.views.desinscription'),
9af73c99 65 (r'^chercheurs/perso/$', 'chercheurs.views.perso'),
b3e1079e 66 (r'^chercheurs/edit/$', 'chercheurs.views.edit'),
d9885bf7 67 (r'^chercheurs/conversion$', 'chercheurs.views.conversion'),
c1b134f8
EMS
68 (r'^accounts/login/$', 'chercheurs.views.chercheur_login'),
69 (r'^accounts/change_password/$', 'chercheurs.views.change_password'),
70 (r'^accounts/send_password/$', 'chercheurs.views.send_password'),
9af73c99 71
c1b134f8 72 # agenda
f0692c02
EMS
73 (r'^agenda/evenements/utilisation/$', 'savoirs.views.evenement_utilisation'),
74 (r'^agenda/evenements/creer/$', 'savoirs.views.evenement_ajout'),
c1b134f8 75
bae03b7b
EMS
76 # section par discipline et/ou région
77 (r'^discipline/(?P<discipline>\d+)/', include(sep_patterns)),
78 (r'^region/(?P<region>\d+)/', include(sep_patterns)),
79 (r'^discipline/(?P<discipline>\d+)/region/(?P<region>\d+)/', include(sep_patterns)),
80
81 # traduction disponible dans le frontend sans permissons
82 url(r'^jsi18n/$', admin.site.i18n_javascript,),
83
84 url(r'^admin_tools/', include('admin_tools.urls')),
85 (r'^admin/', include(admin.site.urls)),
86 (r'^admin/confirmation/(.*)', 'savoirs.admin_views.confirmation'),
87 (r'^admin/assigner_pays', 'savoirs.admin_views.assigner_pays'),
88 (r'^admin/assigner_thematiques', 'savoirs.admin_views.assigner_thematiques'),
89 (r'^admin/(?P<app_name>[^/]*)/(?P<model_name>[^/]*)/assigner_regions', 'savoirs.admin_views.assigner_regions', {}, 'assigner_regions'),
90 (r'^admin/(?P<app_name>[^/]*)/(?P<model_name>[^/]*)/assigner_disciplines', 'savoirs.admin_views.assigner_disciplines', {}, 'assigner_disciplines'),
91 (r'^admin/(.*)', admin.site.root),
92
bae03b7b 93 (r'^accounts/logout/$', 'django.contrib.auth.views.logout', {'template_name': 'accounts/logout.html'}),
bae03b7b
EMS
94 (r'^accounts/new_password/(.+)/(.+)/$', 'chercheurs.views.new_password'),
95
bae03b7b 96 # rss
37c3ba94 97 (r'^rss/(.*)/$', 'django.contrib.syndication.views.feed', {'feed_dict':site_feeds}),
f8c16b3d 98 (r'^json/get/$', 'savoirs.views.json_get'),
99 (r'^json/set/$', 'savoirs.views.json_set'),
155a7c62
CR
100)
101
102if settings.DEBUG:
103 urlpatterns += patterns('',
104 (r'^media/(?P<path>.*)$', 'django.views.static.serve',
105 {'document_root': settings.MEDIA_ROOT}),
106 )