This commit is contained in:
Mahaffey 2018-02-05 16:23:19 -05:00
parent ff87c9baac
commit 048bbb75e1

View File

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