Upgrade to reCAPTCHA v2

reCAPTCHA v1 has been shut down since March 2018.

We now uses reCAPTCHA v2:
- user must check a simple checkbox (No CAPTCHA),
- eventually he must validate a challenge.

Moving keys settings allows to use the captcha for development.

Fixes #192.
This commit is contained in:
Aurélien Delobelle 2018-05-14 13:22:59 +02:00
parent e21666a112
commit ece9a54df3
4 changed files with 15 additions and 6 deletions

View file

@ -6,7 +6,7 @@ The settings that are not listed here are imported from .common
import os
from .common import * # NOQA
from .common import BASE_DIR
from .common import BASE_DIR, import_secret
DEBUG = False
@ -28,3 +28,7 @@ STATIC_ROOT = os.path.join(
STATIC_URL = "/gestion/static/"
MEDIA_ROOT = os.path.join(os.path.dirname(BASE_DIR), "media")
MEDIA_URL = "/gestion/media/"
RECAPTCHA_PUBLIC_KEY = import_secret("RECAPTCHA_PUBLIC_KEY")
RECAPTCHA_PRIVATE_KEY = import_secret("RECAPTCHA_PRIVATE_KEY")