from django.conf.urls import * from django.views.generic import list_detail from django.views.generic.simple import redirect_to from links.models import Link photos_paged = { 'queryset': Link.objects.filter(status__exact=1).order_by('-pub_date'), 'paginate': True, 'page_url': '/links/%d/', } urlpatterns = patterns('', (r'^(?P\d+)/$', list_detail.object_list, dict(photos_paged, template_name='archives/links.html')), (r'^$', redirect_to, {'url': '/links/1/'}), )