summaryrefslogtreecommitdiff
path: root/apps/links/urls.py
blob: 5a16d6ea3432c22094792a2cfbd84479cd45c106 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
from django.conf.urls.defaults 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/'}),
)