From d08b3f2b82e6c0b82c0ef6e7146b17228eac71d7 Mon Sep 17 00:00:00 2001 From: Matthijs Kooijman Date: Tue, 19 Oct 2010 16:24:49 +0200 Subject: [PATCH] tickets: Expose the ticket price to the bookingform template. --- tickets/views.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tickets/views.py b/tickets/views.py index 7c9e9fa..c89d26a 100644 --- a/tickets/views.py +++ b/tickets/views.py @@ -6,7 +6,7 @@ import django from django.shortcuts import render_to_response from django.template import RequestContext -from models import Booking +from models import Booking, TICKET_PRICE class BookingForm(django.forms.ModelForm): class Meta: @@ -63,7 +63,7 @@ def book(request): confirm_booking(booking, 'tickets/booked.eml') return render_to_response('tickets/booked.html', {'booking' : booking}, context_instance=RequestContext(request)) - return render_to_response('tickets/bookingform.html', {'form' : f}, context_instance=RequestContext(request)) + return render_to_response('tickets/bookingform.html', {'form' : f, 'price' : TICKET_PRICE}, context_instance=RequestContext(request)) # These two forms are used for entering payment details. They aren't # very different, so it should really be possible to merge them (but -- 2.30.2