def clean_email(self):
email = self.cleaned_data.get('email')
if BitpollUser.objects.filter(email=email).count() > 0:
raise forms.ValidationError(
_('This address is already associated with an account.'))
return email
文章目录