Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
def clean_email(self):
email = self.cleaned_data['email'].strip()
if User.objects.filter(email__iexact=email).exists():
raise ValidationError('...')
return email
CREATE UNIQUE INDEX accounts_email_uniq ON accounts_user USING BTREE ((lower((email)::text)));
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question