This commit is contained in:
Thomas Achtemichuk 2017-05-17 15:17:55 -04:00
parent c9c383dfad
commit 70205cc64e
No known key found for this signature in database
GPG Key ID: FE3D023793584522

View File

@ -6,8 +6,11 @@ from rest_framework import serializers
class AuthTokenSerializer(serializers.Serializer): class AuthTokenSerializer(serializers.Serializer):
username = serializers.CharField(label=_("Username")) username = serializers.CharField(label=_("Username"))
password = serializers.CharField(label=_("Password"), password = serializers.CharField(
style={'input_type': 'password'}, trim_whitespace=False) label=_("Password"),
style={'input_type': 'password'},
trim_whitespace=False
)
def validate(self, attrs): def validate(self, attrs):
username = attrs.get('username') username = attrs.get('username')