This commit is contained in:
brunomichetti 2022-04-03 16:06:35 +09:00 committed by GitHub
commit 51906b9cef
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -8,7 +8,7 @@ from rest_framework.response import Response
from rest_framework.permissions import (AllowAny,
IsAuthenticated)
from rest_framework.generics import CreateAPIView, ListAPIView, GenericAPIView
from rest_framework.exceptions import NotFound
from rest_framework.exceptions import NotFound, MethodNotAllowed
from rest_framework import status
from allauth.account.adapter import get_adapter
@ -86,6 +86,9 @@ class VerifyEmailView(APIView, ConfirmEmailView):
permission_classes = (AllowAny,)
allowed_methods = ('POST', 'OPTIONS', 'HEAD')
def get(self, *args, **kwargs):
raise MethodNotAllowed('GET')
def get_serializer(self, *args, **kwargs):
return VerifyEmailSerializer(*args, **kwargs)