from django.urls import path, re_path from photologue.views import GalleryArchiveIndexView, GalleryYearArchiveView, PhotoDetailView from .views import CustomGalleryDetailView, GalleryDownload, GalleryUpload, TagDetail # Rather than using photologue default router, we redefine our own router # with login and permission checks. app_name = 'photologue' urlpatterns = [ path('tag//', TagDetail.as_view(), name='tag-detail'), path('gallery/', GalleryArchiveIndexView.as_view(), name='pl-gallery-archive'), re_path(r'^gallery/(?P\d{4})/$', GalleryYearArchiveView.as_view(), name='pl-gallery-archive-year'), path('gallery//', CustomGalleryDetailView.as_view(), name='pl-gallery'), path('gallery///', CustomGalleryDetailView.as_view(), name='pl-gallery-owner'), path('gallery//download/', GalleryDownload.as_view(), name='pl-gallery-download'), path('photo//', PhotoDetailView.as_view(), name='pl-photo'), path('upload/', GalleryUpload.as_view(), name='pl-gallery-upload'), ]