Fixed flake8

This commit is contained in:
mario 2015-11-19 21:46:03 +01:00
parent 160e71e3fe
commit 9447feca24
2 changed files with 4 additions and 5 deletions

View File

@ -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):

View File

@ -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,)