annotate gigs/urls.py @ 130:3062c547bb90
For Django 1.6: new test discovery plus reverse now does urlquote().
My base64 keys were padded with '=' and these got quoted when doing
a reverse to generate the URL. So changed the test to look for a
quoted version of the key. This will change the URLs sent to users, but
I believe it will all be taken care of by Django.
author |
Brian Neal <bgneal@gmail.com> |
date |
Tue, 24 Dec 2013 16:47:27 -0600 |
parents |
23efa49f5e29 |
children |
312f198e8958 |
rev |
line source |
bgneal@44
|
1 """
|
bgneal@44
|
2 Urls for the gigs application.
|
bgneal@44
|
3
|
bgneal@44
|
4 """
|
bgneal@66
|
5 from django.conf.urls import patterns, url
|
bgneal@44
|
6 from django.views.generic import ListView
|
bgneal@44
|
7
|
bgneal@44
|
8 from gigs.models import Gig
|
bgneal@44
|
9
|
bgneal@44
|
10
|
bgneal@44
|
11 urlpatterns = patterns('',
|
bgneal@44
|
12 url(r'^$', 'gigs.views.gigs', name='gigs-index'),
|
bgneal@44
|
13 url(r'^flyers/$',
|
bgneal@44
|
14 ListView.as_view(
|
bgneal@44
|
15 queryset=Gig.objects.exclude(flyer__isnull=True).select_related('flyer'),
|
bgneal@44
|
16 template_name='gigs/flyers.html',
|
bgneal@111
|
17 paginate_by=10,
|
bgneal@44
|
18 context_object_name='gig_list'),
|
bgneal@44
|
19 name='gigs-flyers')
|
bgneal@44
|
20 )
|