]> git.sommitrealweird.co.uk Git - sommitrealweird.git/blob - sommitrealweird/photo/urls.py
Update for newer django
[sommitrealweird.git] / sommitrealweird / photo / urls.py
1 from django.urls import re_path
2 from photo.models import Album
3 from photo.views import AlbumListView, PhotoListView, PhotoView
4
5 urlpatterns = [
6     re_path(r'^$', AlbumListView.as_view()),
7     re_path(r'^(?P<slug>[^/]*)/$', PhotoListView.as_view()),
8     re_path(r'^(?P<slug>[^/]*)/(?P<id>[0-9]+)/$', PhotoView.as_view()),
9 ]