ernestophone.ens.fr/calendrier/urls.py
Martin Pépin a206288bbe Meilleures url
On n'utilise plus des chemins du type `"calendrier.views.home"` sous forme
de chaîne de caratères (déprécié).
2016-08-29 05:38:10 +02:00

20 lines
991 B
Python

from django.conf.urls import url
from calendrier import views
from calendrier.views import EventUpdate, EventDelete
urlpatterns = [
url(r'^new$', views.create_event, name='calendrier-create_event'),
url(r'^$', views.home),
url(r'^edition/(?P<pk>\d+)$', EventUpdate.as_view()),
url(r'^supprimer/(?P<pk>\d+)$', EventDelete.as_view()),
url(r'^resend/(?P<id>\d+)$', views.resend, name='calendrier-resend'),
url(r'^changename/?$', views.changename, name='change-doodle-name'),
url(r'(?P<id>\d+)/reponse/?', views.reponse, name='calendrier-reponse'),
url(r'(?P<codeus>\w{6})/(?P<codeev>\w{6})/oui', views.repouidir),
url(r'(?P<codeus>\w{6})/(?P<codeev>\w{6})/pe', views.reppedir),
url(r'(?P<codeus>\w{6})/(?P<codeev>\w{6})/non', views.repnondir),
url(r'(?P<pYear>\d+)/(?P<pMonth>\d+)/(?P<id>\d+)/?', views.view_event),
url(r'(?P<pYear>\d+)/(?P<pMonth>\d+)/?$', views.calendar),
url(r'(?P<id>\d+)/?', views.view_eventbis, name='view-event'),
]