From 80ee3e62cfbd2f2e29ed68f1fb1eecd2d39b917a Mon Sep 17 00:00:00 2001 From: Raz Date: Wed, 22 Jan 2025 13:26:05 +0100 Subject: [PATCH] fix api views csrf token issue --- api/views.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/api/views.py b/api/views.py index a1c7fee..d97d8b1 100644 --- a/api/views.py +++ b/api/views.py @@ -20,6 +20,10 @@ from django.core.exceptions import ObjectDoesNotExist from .permissions import IsClubOwner from .utils import is_valid_email +from django.views.decorators.csrf import csrf_exempt +from django.utils.decorators import method_decorator + +@method_decorator(csrf_exempt, name='dispatch') class CustomAuthToken(APIView): permission_classes = []