From b79aeace36a934060deeb48bc990df77f571f565 Mon Sep 17 00:00:00 2001 From: wcharles Date: Wed, 9 Oct 2019 16:36:18 +0800 Subject: [PATCH] login with captcha --- groups/forms.py | 2 +- groups/templates/groups/login.html | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/groups/forms.py b/groups/forms.py index f941e967..7696e0a7 100644 --- a/groups/forms.py +++ b/groups/forms.py @@ -4,4 +4,4 @@ from captcha.fields import CaptchaField class GroupsForm(forms.Form): username = forms.CharField(label="用户名", max_length=128, widget=forms.TextInput(attrs={'class': 'form-control', 'placeholder': "Username",'autofocus': ''})) password = forms.CharField(label="密码", max_length=256, widget=forms.PasswordInput(attrs={'class': 'form-control','placeholder': "Password"})) - captcha = CaptchaField(label='验证码', error_messages={"invalid":"验证码错误"}) + captcha = CaptchaField(label='验证码', error_messages={"invalid":"验证码错误"}) diff --git a/groups/templates/groups/login.html b/groups/templates/groups/login.html index cdd957b0..f834427a 100644 --- a/groups/templates/groups/login.html +++ b/groups/templates/groups/login.html @@ -50,8 +50,10 @@