From f5c4b37b00b837a90968bc49ee7e58c9b8f8d412 Mon Sep 17 00:00:00 2001 From: caoqianming Date: Sun, 19 Jan 2020 23:56:35 +0800 Subject: [PATCH] captcha remake --- mysite/settings.py | 4 +++- safesite/templates/login.html | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/mysite/settings.py b/mysite/settings.py index 6c3d9663..86f254cd 100644 --- a/mysite/settings.py +++ b/mysite/settings.py @@ -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', diff --git a/safesite/templates/login.html b/safesite/templates/login.html index 10751eaa..dfcfca4e 100644 --- a/safesite/templates/login.html +++ b/safesite/templates/login.html @@ -144,6 +144,7 @@

{{msg}}

+