Skip to content

Commit 7ef2e13

Browse files
Bump django-recaptcha from 3.0.0 to 4.0.0 (GeoNode#11708)
* Bump django-recaptcha from 3.0.0 to 4.0.0 Bumps [django-recaptcha](https://github.com/torchbox/django-recaptcha) from 3.0.0 to 4.0.0. - [Release notes](https://github.com/torchbox/django-recaptcha/releases) - [Changelog](https://github.com/torchbox/django-recaptcha/blob/main/CHANGELOG.md) - [Commits](django-recaptcha/django-recaptcha@3.0.0...4.0.0) --- updated-dependencies: - dependency-name: django-recaptcha dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> * [Dependencies] Align setup.cfg with requirements.txt * [Dependencies] Align setup.cfg with requirements.txt --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Alessio Fabiani <alessio.fabiani@geosolutionsgroup.com>
1 parent 20f654e commit 7ef2e13

File tree

4 files changed

+8
-5
lines changed

4 files changed

+8
-5
lines changed

create-envfile.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ def _get_vals_to_replace(args):
124124
prog="ENV file builder",
125125
description="Tool for generate environment file automatically. The information can be passed or via CLI or via JSON file ( --file /path/env.json)",
126126
usage="python create-envfile.py localhost -f /path/to/json/file.json",
127-
allow_abbrev=False
127+
allow_abbrev=False,
128128
)
129129
parser.add_argument(
130130
"--noinput",

geonode/people/forms.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,10 @@
2424
from django.contrib.auth.forms import UserCreationForm, UserChangeForm
2525
from django.utils.translation import ugettext as _
2626

27-
from captcha.fields import ReCaptchaField
27+
try:
28+
from captcha.fields import ReCaptchaField
29+
except ImportError:
30+
from django_recaptcha.fields import ReCaptchaField
2831

2932
# Ported in from django-registration
3033
attrs_dict = {"class": "required"}

geonode/settings.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1404,8 +1404,8 @@
14041404
RECAPTCHA_ENABLED = ast.literal_eval(os.environ.get("RECAPTCHA_ENABLED", "False"))
14051405

14061406
if RECAPTCHA_ENABLED:
1407-
if "captcha" not in INSTALLED_APPS:
1408-
INSTALLED_APPS += ("captcha",)
1407+
if "django_recaptcha" not in INSTALLED_APPS:
1408+
INSTALLED_APPS += ("django_recaptcha",)
14091409
ACCOUNT_SIGNUP_FORM_CLASS = os.getenv(
14101410
"ACCOUNT_SIGNUP_FORM_CLASS", "geonode.people.forms.AllauthReCaptchaSignupForm"
14111411
)

requirements.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ django-floppyforms<1.10.0
7171
django-forms-bootstrap<=3.1.0
7272
django-autocomplete-light==3.5.1
7373
django-invitations<2.1.1
74-
django-recaptcha==3.0.0
74+
django-recaptcha==4.0.0
7575

7676
# REST
7777
djangorestframework==3.12.0

0 commit comments

Comments
 (0)