Move urls.py in photologue

This commit is contained in:
Alexandre Iooss 2022-01-30 10:21:05 +01:00
parent 27b1590a10
commit 2a0f41deac
2 changed files with 3 additions and 5 deletions

16
photologue/urls.py Normal file
View file

@ -0,0 +1,16 @@
from django.urls import path, re_path
from photologue_custom.views import CustomGalleryDetailView, GalleryDownload, GalleryUpload, TagDetail
from .views import GalleryArchiveIndexView, GalleryYearArchiveView, PhotoDetailView
app_name = 'photologue'
urlpatterns = [
path('tag/<slug:slug>/', TagDetail.as_view(), name='tag-detail'),
path('gallery/', GalleryArchiveIndexView.as_view(), name='pl-gallery-archive'),
re_path(r'^gallery/(?P<year>\d{4})/$', GalleryYearArchiveView.as_view(), name='pl-gallery-archive-year'),
path('gallery/<slug:slug>/', CustomGalleryDetailView.as_view(), name='pl-gallery'),
path('gallery/<slug:slug>/<int:owner>/', CustomGalleryDetailView.as_view(), name='pl-gallery-owner'),
path('gallery/<slug:slug>/download/', GalleryDownload.as_view(), name='pl-gallery-download'),
path('photo/<slug:slug>/', PhotoDetailView.as_view(), name='pl-photo'),
path('upload/', GalleryUpload.as_view(), name='pl-gallery-upload'),
]