ОК
def validate_email(self, value):
if User.objects.filter(email=value).exists():
raise serializers.ValidationError("Email already exists.")
return value
Size: a a a
ОК
def validate_email(self, value):
if User.objects.filter(email=value).exists():
raise serializers.ValidationError("Email already exists.")
return value
TD
{
"email": [
"This field must be unique."
]
}
error_messages
у полей и сериалайзеров при объявленииs
A
A
error_messages
у полей и сериалайзеров при объявленииA
p
G
Python 3.8.0a4
iS
DT
V💊
iS
DT
DT
iS
iS
AO
AO
s
AO