Up captcha

This commit is contained in:
Artur Barseghyan 2020-12-10 00:03:19 +01:00
parent cbd8849a87
commit 0d82108e97
3 changed files with 13 additions and 13 deletions

View file

@ -2,21 +2,18 @@ from .base import *
INSTALLED_APPS = list(INSTALLED_APPS)
try:
if 'captcha' not in INSTALLED_APPS:
INSTALLED_APPS.append('captcha')
if 'captcha' not in INSTALLED_APPS:
INSTALLED_APPS.append('captcha')
if 'fobi.contrib.plugins.form_elements.security.captcha' \
not in INSTALLED_APPS:
INSTALLED_APPS.append(
'fobi.contrib.plugins.form_elements.security.captcha'
)
CAPTCHA_TEXT_FIELD_TEMPLATE = 'bootstrap3/captcha/text_field.html'
if 'fobi.contrib.plugins.form_elements.security.captcha' \
not in INSTALLED_APPS:
INSTALLED_APPS.append(
'fobi.contrib.plugins.form_elements.security.captcha'
)
ENABLE_CAPTCHA = True
CAPTCHA_TEXT_FIELD_TEMPLATE = 'bootstrap3/captcha/text_field.html'
except Exception as e:
pass
ENABLE_CAPTCHA = True
# FOBI_DEFAULT_THEME = 'simple'

View file

@ -12,7 +12,7 @@ if not 'fobi.contrib.plugins.form_elements.security.recaptcha' \
)
# Test keys are taken from official dedicated Google page
# https://developers.google.com/recaptcha/docs/faq
# https://developers.google.com/recaptcha/docs/faq#id-like-to-run-automated-tests-with-recaptcha.-what-should-i-do
RECAPTCHA_PUBLIC_KEY = '6LeIxAcTAAAAAJcZVRqyHh71UMIEGNQ_MXjiZKhI'
RECAPTCHA_PRIVATE_KEY = '6LeIxAcTAAAAAGG-vFI1TnRWxMZNFuojJ4WifJWe'
RECAPTCHA_USE_SSL = True

View file

@ -47,6 +47,9 @@ Install `fobi` ReCAPTCHA plugin
- ``RECAPTCHA_PUBLIC_KEY``
- ``RECAPTCHA_PRIVATE_KEY``
For testing purposes obtain the keys `here
<https://developers.google.com/recaptcha/docs/faq#id-like-to-run-automated-tests-with-recaptcha.-what-should-i-do>`_:
Troubleshooting and usage limitations
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In combination with other captcha solutions