from django.conf.urls import * from django.views.generic.detail import DetailView from photos.models import Photo urlpatterns = patterns('', (r'^(?P\d+)/$', DetailView.as_view(model=Photo, template_name='details/photo.html')), )