Skip to content

Commit 24675e7

Browse files
committed
Add get function to make verify email browsable
1 parent 624ad01 commit 24675e7

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

rest_auth/registration/views.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
from rest_framework.permissions import (AllowAny,
99
IsAuthenticated)
1010
from rest_framework.generics import CreateAPIView, ListAPIView, GenericAPIView
11-
from rest_framework.exceptions import NotFound
11+
from rest_framework.exceptions import NotFound, MethodNotAllowed
1212
from rest_framework import status
1313

1414
from allauth.account.adapter import get_adapter
@@ -86,6 +86,9 @@ class VerifyEmailView(APIView, ConfirmEmailView):
8686
permission_classes = (AllowAny,)
8787
allowed_methods = ('POST', 'OPTIONS', 'HEAD')
8888

89+
def get(self, *args, **kwargs):
90+
raise MethodNotAllowed('GET')
91+
8992
def get_serializer(self, *args, **kwargs):
9093
return VerifyEmailSerializer(*args, **kwargs)
9194

0 commit comments

Comments
 (0)