mirror of
https://github.com/Tivix/django-rest-auth.git
synced 2024-11-22 00:56:34 +03:00
Use same password fields for PasswordChangeSerializer and PasswordResetConfirmSerializer. Thanks @sloria
This commit is contained in:
parent
cfe6c5b693
commit
dfe3f12356
|
@ -187,8 +187,8 @@ class PasswordResetConfirmSerializer(serializers.Serializer):
|
|||
"""
|
||||
Serializer for requesting a password reset e-mail.
|
||||
"""
|
||||
new_password1 = serializers.CharField(max_length=128)
|
||||
new_password2 = serializers.CharField(max_length=128)
|
||||
new_password1 = serializers.CharField(write_only=True, style={'input_type': 'password'}, trim_whitespace=False)
|
||||
new_password2 = serializers.CharField(write_only=True, style={'input_type': 'password'}, trim_whitespace=False)
|
||||
uid = serializers.CharField()
|
||||
token = serializers.CharField()
|
||||
|
||||
|
@ -224,9 +224,9 @@ class PasswordResetConfirmSerializer(serializers.Serializer):
|
|||
|
||||
|
||||
class PasswordChangeSerializer(serializers.Serializer):
|
||||
old_password = serializers.CharField(max_length=128)
|
||||
new_password1 = serializers.CharField(max_length=128)
|
||||
new_password2 = serializers.CharField(max_length=128)
|
||||
old_password = serializers.CharField(write_only=True, style={'input_type': 'password'}, trim_whitespace=False)
|
||||
new_password1 = serializers.CharField(write_only=True, style={'input_type': 'password'}, trim_whitespace=False)
|
||||
new_password2 = serializers.CharField(write_only=True, style={'input_type': 'password'}, trim_whitespace=False)
|
||||
|
||||
set_password_form_class = SetPasswordForm
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user