Add captcha to registration form

This commit is contained in:
Grégoire Duvauchelle
2018-07-06 11:35:02 +02:00
committed by Skia
parent b2abc78694
commit afe78ea634
5 changed files with 45 additions and 1 deletions

View File

@ -21,7 +21,7 @@
# Place - Suite 330, Boston, MA 02111-1307, USA.
#
#
from captcha.fields import CaptchaField
from django.contrib.auth.forms import UserCreationForm, AuthenticationForm
from django import forms
from django.conf import settings
@ -148,6 +148,7 @@ class LoginForm(AuthenticationForm):
class RegisteringForm(UserCreationForm):
error_css_class = 'error'
required_css_class = 'required'
captcha = CaptchaField()
class Meta:
model = User