special galleries: helper module, renderers, templates & urls; hide back in special views; highlight active special
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
# Django imports
|
||||
from django.urls import path
|
||||
from django.urls import path, re_path
|
||||
|
||||
# Module imports
|
||||
from .views import gallery_view, toggle_settings
|
||||
from .views import gallery_view, toggle_settings, special_gallery_view
|
||||
|
||||
###########################################################################################
|
||||
# URL Patterns. #
|
||||
@@ -13,5 +13,17 @@ urlpatterns = [
|
||||
# Views.
|
||||
path("", gallery_view, name="gallery_view_root"),
|
||||
path("toggle-settings/", toggle_settings, name="toggle_settings"),
|
||||
# Special gallery routes (explicit list to avoid clashing with regular paths)
|
||||
re_path(
|
||||
r"^(?P<gallery>favorites|most-visited|recent)/(?P<path>.*)/$",
|
||||
special_gallery_view,
|
||||
name="special_gallery_view_path",
|
||||
),
|
||||
re_path(
|
||||
r"^(?P<gallery>favorites|most-visited|recent)/$",
|
||||
special_gallery_view,
|
||||
name="special_gallery_view_root",
|
||||
),
|
||||
# Generic gallery path (catch-all for filesystem paths)
|
||||
path("<path:path>/", gallery_view, name="gallery_view_path"),
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user