photo26/photologue/urls.py
2022-03-02 13:11:24 +01:00

17 lines
959 B
Python

from django.urls import path, re_path
from .views import (GalleryDetailView, GalleryArchiveIndexView,
GalleryDownload, GalleryUpload, GalleryYearArchiveView,
PhotoDetailView, TagDetail)
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>/', GalleryDetailView.as_view(), name='pl-gallery'),
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('upload/', GalleryUpload.as_view(), name='pl-gallery-upload'),
]