summaryrefslogtreecommitdiff
path: root/app/photos/detail_urls.py
diff options
context:
space:
mode:
Diffstat (limited to 'app/photos/detail_urls.py')
-rw-r--r--app/photos/detail_urls.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/app/photos/detail_urls.py b/app/photos/detail_urls.py
index 9ff9b84..3acd139 100644
--- a/app/photos/detail_urls.py
+++ b/app/photos/detail_urls.py
@@ -1,10 +1,12 @@
-from django.conf.urls.defaults import *
+from django.conf.urls import *
+from django.views.generic.base import RedirectView
+from django.views.generic.detail import DetailView
from photos.models import Photo
detail_dict = {
'queryset': Photo.objects.all(),
}
-urlpatterns = patterns('django.views.generic.list_detail',
- (r'^(?P<object_id>\d+)/$', 'object_detail', dict(detail_dict, template_name='details/photo.html')),
+urlpatterns = patterns('',
+ (r'^(?P<object_id>\d+)/$', DetailView.as_view(model=Photos,template_name='details/photo.html')),
)