Commits

Luke Plant committed 836aab2

Fixed pay_done and pay_cancelled views for use by Paypal

Comments (0)

Files changed (1)

cciw/bookings/views.py

 from django.core.urlresolvers import reverse, reverse_lazy
 from django.http import HttpResponseRedirect, Http404
 from django.utils.crypto import salted_hmac
+from django.views.decorators.csrf import csrf_exempt
 from django.views.generic.base import TemplateView, TemplateResponseMixin
 from django.views.generic.edit import ProcessFormView, FormMixin, ModelFormMixin, BaseUpdateView, BaseCreateView
 from paypal.standard.forms import PayPalPaymentsForm
 edit_place = booking_account_required(BookingEditPlace.as_view())
 list_bookings = booking_account_required(BookingListBookings.as_view())
 pay = booking_account_required(BookingPay.as_view())
-pay_done = BookingPayDone.as_view()
-pay_cancelled = BookingPayCancelled.as_view()
+pay_done = csrf_exempt(BookingPayDone.as_view())
+pay_cancelled = csrf_exempt(BookingPayCancelled.as_view())