mirror of
https://github.com/Hopiu/django-fobi.git
synced 2026-03-16 22:10:28 +00:00
Up captcha
This commit is contained in:
parent
cbd8849a87
commit
0d82108e97
3 changed files with 13 additions and 13 deletions
|
|
@ -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'
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue