from django.conf.urls import url
-from models import Album
-from views import AlbumListView
+from photo.models import Album
+from photo.views import AlbumListView, PhotoListView, PhotoView
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'),
+ url(r'^(?P<slug>[^/]*)/$', PhotoListView.as_view()),
+ url(r'^(?P<slug>[^/]*)/(?P<id>[0-9]+)/$', PhotoView.as_view()),
]