Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump django-recaptcha from 3.0.0 to 4.0.0 #11708

Merged
merged 5 commits into from
Jan 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion create-envfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ def _get_vals_to_replace(args):
prog="ENV file builder",
description="Tool for generate environment file automatically. The information can be passed or via CLI or via JSON file ( --file /path/env.json)",
usage="python create-envfile.py localhost -f /path/to/json/file.json",
allow_abbrev=False
allow_abbrev=False,
)
parser.add_argument(
"--noinput",
Expand Down
5 changes: 4 additions & 1 deletion geonode/people/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,10 @@
from django.contrib.auth.forms import UserCreationForm, UserChangeForm
from django.utils.translation import ugettext as _

from captcha.fields import ReCaptchaField
try:
from captcha.fields import ReCaptchaField
except ImportError:
from django_recaptcha.fields import ReCaptchaField

Check warning on line 30 in geonode/people/forms.py

View check run for this annotation

Codecov / codecov/patch

geonode/people/forms.py#L29-L30

Added lines #L29 - L30 were not covered by tests

# Ported in from django-registration
attrs_dict = {"class": "required"}
Expand Down
4 changes: 2 additions & 2 deletions geonode/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -1404,8 +1404,8 @@
RECAPTCHA_ENABLED = ast.literal_eval(os.environ.get("RECAPTCHA_ENABLED", "False"))

if RECAPTCHA_ENABLED:
if "captcha" not in INSTALLED_APPS:
INSTALLED_APPS += ("captcha",)
if "django_recaptcha" not in INSTALLED_APPS:
INSTALLED_APPS += ("django_recaptcha",)

Check warning on line 1408 in geonode/settings.py

View check run for this annotation

Codecov / codecov/patch

geonode/settings.py#L1408

Added line #L1408 was not covered by tests
ACCOUNT_SIGNUP_FORM_CLASS = os.getenv(
"ACCOUNT_SIGNUP_FORM_CLASS", "geonode.people.forms.AllauthReCaptchaSignupForm"
)
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ django-floppyforms<1.10.0
django-forms-bootstrap<=3.1.0
django-autocomplete-light==3.5.1
django-invitations<2.1.1
django-recaptcha==3.0.0
django-recaptcha==4.0.0

# REST
djangorestframework==3.12.0
Expand Down
Loading