changeset 163:7fc4123fef70

Stop passing callable to queryset. This is now deprecated. The usage here was most likely a mistake that has worked all these years. This change was for upgrading to Django 1.7.
author Brian Neal <bgneal@gmail.com>
date Thu, 02 Apr 2015 19:17:47 -0500
parents 27b38cc65ca4
children 36b49a39526f
files gigs/templatetags/gig_tags.py
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/gigs/templatetags/gig_tags.py	Thu Apr 02 19:03:46 2015 -0500
+++ b/gigs/templatetags/gig_tags.py	Thu Apr 02 19:17:47 2015 -0500
@@ -15,7 +15,8 @@
 @register.inclusion_tag('gigs/upcoming_gigs_tag.html')
 def upcoming_gigs():
 
-    gigs = Gig.objects.filter(date__gte=datetime.date.today).select_related(
+    today = datetime.date.today()
+    gigs = Gig.objects.filter(date__gte=today).select_related(
         'flyer', 'venue', 'venue__city', 'venue__city__state',
         'venue__city__country').order_by('date')[:10]