Add delete photo view

This commit is contained in:
Alexandre Iooss 2022-03-02 13:13:59 +01:00
parent f17adbb2ed
commit f9c33e2cad
3 changed files with 39 additions and 2 deletions

View file

@ -2,7 +2,7 @@ from django.urls import path, re_path
from .views import (GalleryDetailView, GalleryArchiveIndexView,
GalleryDownload, GalleryUpload, GalleryYearArchiveView,
PhotoDetailView, TagDetail)
PhotoDetailView, PhotoDeleteView, TagDetail)
app_name = 'photologue'
urlpatterns = [
@ -13,5 +13,6 @@ urlpatterns = [
path('gallery/<slug:slug>/<int:owner>/', GalleryDetailView.as_view(), name='pl-gallery-owner'),
path('gallery/<slug:slug>/download/', GalleryDownload.as_view(), name='pl-gallery-download'),
path('photo/<int:pk>/', PhotoDetailView.as_view(), name='pl-photo'),
path('photo/<int:pk>/delete/', PhotoDeleteView.as_view(), name='pl-photo-delete'),
path('upload/', GalleryUpload.as_view(), name='pl-gallery-upload'),
]