Mercurial > public > madeira
diff mysite/band/views.py @ 5:e602b5302b94
Added support for countries beside the USA.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Thu, 14 May 2009 00:31:39 +0000 |
parents | 0dcfcdf50c62 |
children | dac690ab98b2 |
line wrap: on
line diff
--- a/mysite/band/views.py Sun Apr 19 18:36:56 2009 +0000 +++ b/mysite/band/views.py Thu May 14 00:31:39 2009 +0000 @@ -77,6 +77,7 @@ venues = set([]) cities = set([]) states = set([]) + countries = set([]) bands = set([]) for gig in previous: if gig.venue.id not in venues: @@ -85,6 +86,8 @@ cities.add(gig.venue.city.id) if gig.venue.city.state and gig.venue.city.state.id not in states: states.add(gig.venue.city.state.id) + if gig.venue.city.country and gig.venue.city.country.id not in countries: + countries.add(gig.venue.city.country.id) for band in gig.bands.all(): if band.id not in bands: bands.add(band.id) @@ -93,6 +96,7 @@ stats['venues'] = len(venues) stats['cities'] = len(cities) stats['states'] = len(states) + stats['countries'] = len(countries) stats['bands'] = len(bands) flyerGigs = Gig.objects.exclude(flyer__isnull = True).order_by('-date')