captcha remake

This commit is contained in:
caoqianming 2020-01-19 23:56:35 +08:00
parent 3b41d17151
commit f5c4b37b00
2 changed files with 4 additions and 1 deletions

View File

@ -44,7 +44,9 @@ INSTALLED_APPS = [
'captcha',
]
CAPTCHA_CHALLENGE_FUNCT = 'captcha.helpers.math_challenge'
# CAPTCHA_CHALLENGE_FUNCT = 'captcha.helpers.math_challenge'
CAPTCHA_NOISE_FUNCTIONS = ('captcha.helpers.noise_null',)
CAPTCHA_BACKGROUND_COLOR = 'orange'
MIDDLEWARE = [
'django.middleware.security.SecurityMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',

View File

@ -144,6 +144,7 @@
</div>
<p style="color:red;text-align: center">{{msg}}</p>
<div class="login-center clearfix">
<div class="login-center-input">
{{ user_form.captcha }}
</div>