summaryrefslogtreecommitdiff
path: root/apps/links/detail_urls.py
blob: 2b6ec5dee60d33edbf4b6ff08de38af426eeb11d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
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<object_id>\d+)/$', 'object_detail', dict(detail_dict, template_name='details/link.html')),
)