mirror of
https://github.com/Tivix/django-rest-auth.git
synced 2024-11-22 09:06:40 +03:00
spacing
This commit is contained in:
parent
ff87c9baac
commit
048bbb75e1
|
@ -36,6 +36,7 @@ class LoginSerializer(serializers.Serializer):
|
|||
|
||||
def _validate_username(self, username, password):
|
||||
user = None
|
||||
|
||||
if username and password:
|
||||
user = authenticate(username=username, password=password)
|
||||
else:
|
||||
|
@ -115,6 +116,7 @@ class TokenSerializer(serializers.ModelSerializer):
|
|||
"""
|
||||
Serializer for Token model.
|
||||
"""
|
||||
|
||||
class Meta:
|
||||
model = TokenModel
|
||||
fields = ('key',)
|
||||
|
|
Loading…
Reference in New Issue
Block a user