tickets: Use RequestContext.
authorMatthijs Kooijman <matthijs@stdin.nl>
Tue, 19 Oct 2010 08:51:50 +0000 (10:51 +0200)
committerMatthijs Kooijman <matthijs@stdin.nl>
Tue, 19 Oct 2010 09:03:20 +0000 (11:03 +0200)
tickets/views.py

index 3e9547f689f8bb9d524895e61d7cac5037df0338..f0cdfa4be9d00616584d08ce01404dff4e9529e8 100644 (file)
@@ -2,6 +2,7 @@
 
 import django
 from django.shortcuts import render_to_response
+from django.template import RequestContext
 
 from models import Booking
 
@@ -57,6 +58,6 @@ def book(request):
     if f.is_valid():
         booking = f.save()
         confirm_booking(booking)
-        return render_to_response('tickets/booked.html', {'booking' : booking})
+        return render_to_response('tickets/booked.html', {'booking' : booking}, context_instance=RequestContext(request))
 
-    return render_to_response('tickets/bookingform.html', {'form' : f})
+    return render_to_response('tickets/bookingform.html', {'form' : f}, context_instance=RequestContext(request))