Answers for "change password serializer"

0

change password serializer

from rest_framework import serializers
from django.contrib.auth.models import User

class ChangePasswordSerializer(serializers.Serializer):
    model = User

    """
    Serializer for password change endpoint.
    """
    old_password = serializers.CharField(required=True)
    new_password = serializers.CharField(required=True)
Posted by: Guest on May-04-2021

Browse Popular Code Answers by Language