]> git.sommitrealweird.co.uk Git - sommitrealweird.git/blobdiff - sommitrealweird/photo/urls.py
Update for newer django
[sommitrealweird.git] / sommitrealweird / photo / urls.py
index dbea64f99eca4e3d7560208fba04d33b857e1fbc..c5de1db56b170bedfb9432ecc7f38d478009141d 100644 (file)
@@ -1,9 +1,9 @@
-from django.conf.urls import url
-from models import Album
-from views import AlbumListView
+from django.urls import re_path
+from photo.models import Album
+from photo.views import AlbumListView, PhotoListView, PhotoView
 
 urlpatterns = [
 
 urlpatterns = [
-    url(r'^$', AlbumListView.as_view()),
-    url(r'^(?P<slug>[^/]*)/$', 'photo.views.album_view'),
-    url(r'^(?P<slug>[^/]*)/(?P<id>[0-9]+)/$', 'photo.views.photo_view'),
+    re_path(r'^$', AlbumListView.as_view()),
+    re_path(r'^(?P<slug>[^/]*)/$', PhotoListView.as_view()),
+    re_path(r'^(?P<slug>[^/]*)/(?P<id>[0-9]+)/$', PhotoView.as_view()),
 ]
 ]