Mercurial > public > sg101
diff contact/forms.py @ 1173:a1a223ab0c8f
Improve form error message when missing captcha response
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Sat, 14 Apr 2018 14:03:04 -0500 |
parents | b957e4829a03 |
children |
line wrap: on
line diff
--- a/contact/forms.py Sat Apr 14 13:53:05 2018 -0500 +++ b/contact/forms.py Sat Apr 14 14:03:04 2018 -0500 @@ -42,7 +42,7 @@ super(ContactForm, self).clean() captcha_response = self.request.POST.get('g-recaptcha-response') if not captcha_response: - raise forms.ValidationError('Missing reCAPTCHA response') + raise forms.ValidationError("Please verify you aren't a robot") r = requests.post(settings.RECAPTCHA_URL, data={ 'secret': settings.RECAPTCHA_SECRET_KEY, 'response': captcha_response,