Mercurial > public > madeira
comparison gigs/urls.py @ 71:e2868ad47a1e
For Django 1.4, using the new manage.py.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Sat, 14 Apr 2012 16:40:29 -0500 |
parents | madeira/gigs/urls.py@9b9daefba97a |
children | 23efa49f5e29 |
comparison
equal
deleted
inserted
replaced
70:f26cdda0ad8b | 71:e2868ad47a1e |
---|---|
1 """ | |
2 Urls for the gigs application. | |
3 | |
4 """ | |
5 from django.conf.urls import patterns, url | |
6 from django.views.generic import ListView | |
7 | |
8 from gigs.models import Gig | |
9 | |
10 | |
11 urlpatterns = patterns('', | |
12 url(r'^$', 'gigs.views.gigs', name='gigs-index'), | |
13 url(r'^flyers/$', | |
14 ListView.as_view( | |
15 queryset=Gig.objects.exclude(flyer__isnull=True).select_related('flyer'), | |
16 template_name='gigs/flyers.html', | |
17 context_object_name='gig_list'), | |
18 name='gigs-flyers') | |
19 ) |