From 823de60e8c8ecc42b51461643a34a84f4353d8e0 Mon Sep 17 00:00:00 2001 From: Martin Gross Date: Tue, 31 May 2022 19:02:55 +0200 Subject: [PATCH] PPv2: Make XHR view a proper view and not a TemplateView --- src/pretix/plugins/paypal2/views.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pretix/plugins/paypal2/views.py b/src/pretix/plugins/paypal2/views.py index 42842eb24f..87d25e84f5 100644 --- a/src/pretix/plugins/paypal2/views.py +++ b/src/pretix/plugins/paypal2/views.py @@ -47,6 +47,7 @@ from django.urls import reverse from django.utils.decorators import method_decorator from django.utils.functional import cached_property from django.utils.translation import gettext_lazy as _ +from django.views import View from django.views.decorators.clickjacking import xframe_options_exempt from django.views.decorators.csrf import csrf_exempt from django.views.decorators.http import require_POST @@ -115,8 +116,7 @@ def redirect_view(request, *args, **kwargs): @method_decorator(csrf_exempt, name='dispatch') @method_decorator(xframe_options_exempt, 'dispatch') -class XHRView(TemplateView): - template_name = '' +class XHRView(View): def post(self, request, *args, **kwargs): if 'order' in self.kwargs: