Mercurial > public > madeira
diff 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 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/gigs/urls.py Sat Apr 14 16:40:29 2012 -0500 @@ -0,0 +1,19 @@ +""" +Urls for the gigs application. + +""" +from django.conf.urls import patterns, url +from django.views.generic import ListView + +from gigs.models import Gig + + +urlpatterns = patterns('', + url(r'^$', 'gigs.views.gigs', name='gigs-index'), + url(r'^flyers/$', + ListView.as_view( + queryset=Gig.objects.exclude(flyer__isnull=True).select_related('flyer'), + template_name='gigs/flyers.html', + context_object_name='gig_list'), + name='gigs-flyers') +)