diff --git a/eshop/accounts_ext/forms.py b/eshop/accounts_ext/forms.py index 70d866a..1c29a67 100644 --- a/eshop/accounts_ext/forms.py +++ b/eshop/accounts_ext/forms.py @@ -56,6 +56,13 @@ class RegistrationForm(RegistrationFormUniqueEmail): raise forms.ValidationError(_('Введите email с валидными доменом')) return email + def clean_captcha(self): + captcha = super().clean_captcha() + if not captcha: + raise forms.ValidationError("Enter captcha") + print(captcha) + return captcha + def save(self, commit=True): user = super().save(commit) profile = Profile.objects.filter(user=user).first()