ernestophone.ens.fr/partitions/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

24 lines
1.1 KiB
Python

from django.conf.urls import url
from partitions import views
urlpatterns = [
url(r'^$', views.liste, name='partitions-liste'),
url(r'^(?P<nom>[^/]+)/(?P<auteur>[^/]+)/?$', views.listepart,
name='partitions-listepart'),
url(r'^(?P<nom>[^/]+)/(?P<auteur>[^/]+)/upload/?$', views.upload,
name='partitions-upload'),
url(r'^(?P<nom>[^/]+)/(?P<auteur>[^/]+)/delete/?$', views.delete_morc,
name='partitions-delete_morc'),
url(r'^(?P<nom>[^/]+)/(?P<auteur>[^/]+)/conf/?$', views.conf_delete_morc,
name='partitions-conf_delete_morc'),
url(r'^(?P<nom>[^/]+)/(?P<auteur>[^/]+)/see/(?P<partition_id>\d+)/?$',
views.see, name='partitions-see'),
url(r'^(?P<nom>[^/]+)/(?P<auteur>[^/]+)/(?P<partition_id>\d+)/$',
views.download, name='partitions-download'),
url(r'^(?P<nom>[^/]+)/(?P<auteur>[^/]+)/(?P<id>[^/]+)/delete/?$',
views.delete, name='partitions-delete'),
url(r'^(?P<nom>[^/]+)/(?P<auteur>[^/]+)/(?P<id>[^/]+)/conf/?$',
views.conf_delete, name='partitions-conf_delete'),
url(r'^new/?$', views.ajouter_morceau, name='partitions-ajouter_morceau'),
]