mirror of
https://github.com/Tivix/django-rest-auth.git
synced 2024-11-22 09:06:40 +03:00
make registration API browsable
This commit is contained in:
parent
1732b15041
commit
bbc9eeee3a
|
@ -16,6 +16,13 @@ class Register(APIView, SignupView):
|
|||
|
||||
permission_classes = (AllowAny,)
|
||||
user_serializer_class = UserDetailsSerializer
|
||||
allowed_methods = ('POST', 'OPTIONS', 'HEAD')
|
||||
|
||||
def get(self, *args, **kwargs):
|
||||
return Response({}, status=status.HTTP_405_METHOD_NOT_ALLOWED)
|
||||
|
||||
def put(self, *args, **kwargs):
|
||||
return Response({}, status=status.HTTP_405_METHOD_NOT_ALLOWED)
|
||||
|
||||
def form_valid(self, form):
|
||||
self.user = form.save(self.request)
|
||||
|
|
Loading…
Reference in New Issue
Block a user