from django.conf.urls.defaults import * from photos.models import Photo detail_dict = { 'queryset': Photo.objects.all(), } urlpatterns = patterns('django.views.generic.list_detail', (r'^(?P\d+)/$', 'object_detail', dict(detail_dict, template_name='details/photo.html')), )