Add slideshow
This commit is contained in:
parent
47b543bbb3
commit
38fa9ddf3f
4 changed files with 97 additions and 10 deletions
|
@ -1,20 +1,17 @@
|
|||
from django.urls import path, register_converter
|
||||
from django.urls import path, re_path, register_converter
|
||||
|
||||
from . import converters, views
|
||||
|
||||
register_converter(converters.FilenamePathConverter, 'filename')
|
||||
|
||||
|
||||
app_name = 'gallery'
|
||||
|
||||
urlpatterns = [
|
||||
|
||||
path('', views.AlbumsList.as_view(), name='main_url'),
|
||||
path('about/', views.About.as_view(), name='about_url'),
|
||||
path('search/', views.Search.as_view(), name='search_url'),
|
||||
path('photostream/', views.PhotosList.as_view(), name='photos_url'),
|
||||
path('like/<slug:album_slug>/<filename:photo_slug>', views.PhotoLike.as_view(), name='photo_like_url'),
|
||||
path('albums/<path:album_slug>/<filename:photo_slug>', views.PhotoDetail.as_view(), name='photo_url'),
|
||||
re_path(r'^like/(?P<album_slug>.+)/(?P<photo_slug>[a-zA-Z0-9_-]{1,50}\.[a-zA-Z]{3,4})/?$', views.PhotoLike.as_view(), name='photo_like_url'),
|
||||
re_path(r'^slideshow/(?P<album_slug>.+)/(?P<photo_slug>[a-zA-Z0-9_-]{1,50}\.[a-zA-Z]{3,4})/?$', views.PhotoSlideshow.as_view(), name='photo_slideshow_url'),
|
||||
re_path(r'^albums/(?P<album_slug>.+)/(?P<photo_slug>[a-zA-Z0-9_-]{1,50}\.[a-zA-Z]{3,4})/?$', views.PhotoDetail.as_view(), name='photo_url'),
|
||||
path('albums/<path:album_slug>/', views.AlbumDetail.as_view(), name='album_url'),
|
||||
path('albums/', views.AlbumsList.as_view(), name='albums_url'),
|
||||
path('<path:redir_path>/', views.redirect_to_album, name='redirect_to_album'),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue