From 3c8a1427da7ddfce1435f0d55ee696651d658753 Mon Sep 17 00:00:00 2001 From: Thomas Steen Rasmussen Date: Sun, 29 May 2016 19:21:44 +0200 Subject: [PATCH] move csrf_exempt decorator to dispatch() --- shop/views.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/shop/views.py b/shop/views.py index 1b8e485b..c5a4a162 100644 --- a/shop/views.py +++ b/shop/views.py @@ -382,6 +382,9 @@ class CoinifyRedirectView(LoginRequiredMixin, EnsureUserOwnsOrderMixin, EnsureUn class CoinifyCallbackView(SingleObjectMixin, View): @method_decorator(csrf_exempt) + def dispatch(self, *args, **kwargs): + return super(CoinifyCallbackView, self).dispatch(*args, **kwargs) + def post(self, request, *args, **kwargs): # Get the signature from the HTTP headers signature = request.META['HTTP_X_COINIFY_CALLBACK_SIGNATURE']