From 9447feca24c0d09dfc4222ece650d18dfdc6848b Mon Sep 17 00:00:00 2001 From: mario Date: Thu, 19 Nov 2015 21:46:03 +0100 Subject: [PATCH] Fixed flake8 --- rest_auth/registration/views.py | 5 ++--- rest_auth/views.py | 4 ++-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/rest_auth/registration/views.py b/rest_auth/registration/views.py index 38988c9..94f055d 100644 --- a/rest_auth/registration/views.py +++ b/rest_auth/registration/views.py @@ -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): diff --git a/rest_auth/views.py b/rest_auth/views.py index 6a992db..f942541 100644 --- a/rest_auth/views.py +++ b/rest_auth/views.py @@ -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,)