Add recaptcha to password reset form.

This should be all public facing pages covered.
This commit is contained in:
Tom Price
2015-04-25 17:04:15 +01:00
parent 42e8de7d9d
commit 291e6d5c26
3 changed files with 12 additions and 7 deletions

View File

@@ -3,7 +3,7 @@ from django import forms
from django.utils import formats
from django.conf import settings
from django.core import serializers
from django.contrib.auth.forms import AuthenticationForm
from django.contrib.auth.forms import AuthenticationForm, PasswordResetForm
from registration.forms import RegistrationFormUniqueEmail
from captcha.fields import ReCaptchaField
import simplejson
@@ -30,6 +30,9 @@ class ProfileRegistrationFormUniqueEmail(RegistrationFormUniqueEmail):
class LoginForm(AuthenticationForm):
captcha = ReCaptchaField(label='Captcha')
class PasswordReset(PasswordResetForm):
captcha = ReCaptchaField(label='Captcha')
# Events Shit
class EventForm(forms.ModelForm):
datetime_input_formats = formats.get_format_lazy("DATETIME_INPUT_FORMATS") + settings.DATETIME_INPUT_FORMATS