mirror of
				https://github.com/Tivix/django-rest-auth.git
				synced 2025-11-04 09:37:35 +03:00 
			
		
		
		
	Add get function to make verify email browsable
This commit is contained in:
		
							parent
							
								
									624ad01afb
								
							
						
					
					
						commit
						24675e77b1
					
				| 
						 | 
					@ -8,7 +8,7 @@ from rest_framework.response import Response
 | 
				
			||||||
from rest_framework.permissions import (AllowAny,
 | 
					from rest_framework.permissions import (AllowAny,
 | 
				
			||||||
                                        IsAuthenticated)
 | 
					                                        IsAuthenticated)
 | 
				
			||||||
from rest_framework.generics import CreateAPIView, ListAPIView, GenericAPIView
 | 
					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 rest_framework import status
 | 
				
			||||||
 | 
					
 | 
				
			||||||
from allauth.account.adapter import get_adapter
 | 
					from allauth.account.adapter import get_adapter
 | 
				
			||||||
| 
						 | 
					@ -86,6 +86,9 @@ class VerifyEmailView(APIView, ConfirmEmailView):
 | 
				
			||||||
    permission_classes = (AllowAny,)
 | 
					    permission_classes = (AllowAny,)
 | 
				
			||||||
    allowed_methods = ('POST', 'OPTIONS', 'HEAD')
 | 
					    allowed_methods = ('POST', 'OPTIONS', 'HEAD')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    def get(self, *args, **kwargs):
 | 
				
			||||||
 | 
					        raise MethodNotAllowed('GET')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def get_serializer(self, *args, **kwargs):
 | 
					    def get_serializer(self, *args, **kwargs):
 | 
				
			||||||
        return VerifyEmailSerializer(*args, **kwargs)
 | 
					        return VerifyEmailSerializer(*args, **kwargs)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue
	
	Block a user