Add captcha to registration form

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

No files matched your search

+2 -1
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