from django.conf.urls.defaults import * from django.views.generic.simple import redirect_to from links.models import Link detail_dict = { 'queryset': Link.objects.filter(status__exact=1), } urlpatterns = patterns('django.views.generic.list_detail', (r'^$', redirect_to, {'url': '/links/1/'}), (r'^(?P\d+)/$', 'object_detail', dict(detail_dict, template_name='details/link.html')), )