mirror of
https://github.com/Tivix/django-rest-auth.git
synced 2025-07-22 13:39:45 +03:00
Fixed flake8
This commit is contained in:
parent
160e71e3fe
commit
9447feca24
|
@ -9,7 +9,7 @@ from allauth.account.views import SignupView, ConfirmEmailView
|
|||
from allauth.account.utils import complete_signup
|
||||
from allauth.account import app_settings
|
||||
|
||||
from rest_auth.app_settings import TokenSerializer, UserDetailsSerializer
|
||||
from rest_auth.app_settings import UserDetailsSerializer
|
||||
from rest_auth.registration.serializers import SocialLoginSerializer
|
||||
from rest_auth.views import LoginView
|
||||
|
||||
|
@ -22,13 +22,12 @@ class RegisterView(APIView, SignupView):
|
|||
Calls allauth complete_signup method
|
||||
|
||||
Accept the following POST parameters: username, email, password
|
||||
Return the REST Framework Token Object's key.
|
||||
Return user details and DRF's token key.
|
||||
"""
|
||||
|
||||
permission_classes = (AllowAny,)
|
||||
allowed_methods = ('POST', 'OPTIONS', 'HEAD')
|
||||
token_model = Token
|
||||
serializer_class = TokenSerializer
|
||||
response_serializer = UserDetailsSerializer
|
||||
|
||||
def get(self, *args, **kwargs):
|
||||
|
|
|
@ -25,7 +25,7 @@ class LoginView(GenericAPIView):
|
|||
in Django session framework
|
||||
|
||||
Accept the following POST parameters: username, password
|
||||
Return the REST Framework Token Object's key.
|
||||
Return user details and DRF's token key.
|
||||
"""
|
||||
permission_classes = (AllowAny,)
|
||||
serializer_class = LoginSerializer
|
||||
|
@ -88,7 +88,7 @@ class UserDetailsView(RetrieveUpdateAPIView):
|
|||
Accepts the following POST parameters:
|
||||
Required: token
|
||||
Optional: email, first_name, last_name and UserProfile fields
|
||||
Returns the updated UserProfile and/or User object.
|
||||
Returns DRF's token key with updated UserProfile and/or User object.
|
||||
"""
|
||||
serializer_class = UserDetailsSerializer
|
||||
permission_classes = (IsAuthenticated,)
|
||||
|
|
Loading…
Reference in New Issue
Block a user