blob: fa8e042bf31caa0617999aeece15b50803cc98da (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
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<page>\d+)/$', list_detail.object_list, dict(photos_paged, template_name='archives/links.html')),
(r'^$', redirect_to, {'url': '/links/1/'}),
)
|