Skip to content

armgit / wger

Public Imported from GitHub
0

Self hosted FLOSS fitness/workout, nutrition and weight tracker

Update django recaptcha package names

Roland Geiderb10df79f8299
diff --git a/wger/core/forms.py b/wger/core/forms.py
index ee367da7b..c6e9bf7c4 100644
--- a/wger/core/forms.py
+++ b/wger/core/forms.py
@@ -36,8 +36,6 @@ from django.forms import (
from django.utils.translation import gettext as _
# Third Party
-from captcha.fields import ReCaptchaField
-from captcha.widgets import ReCaptchaV3
from crispy_forms.helper import FormHelper
from crispy_forms.layout import (
HTML,
@@ -48,6 +46,8 @@ from crispy_forms.layout import (
Row,
Submit,
)
+from django_recaptcha.fields import ReCaptchaField
+from django_recaptcha.widgets import ReCaptchaV3
# wger
from wger.core.models import UserProfile
@@ -196,7 +196,7 @@ class UserEmailForm(forms.ModelForm):
if not email:
return email
try:
- #Performs a case-insensitive lookup
+ # Performs a case-insensitive lookup
user = User.objects.get(email__iexact=email)
if user.email == self.instance.email:
return email
diff --git a/wger/core/models/profile.py b/wger/core/models/profile.py
index 8edda7b73..ba7ca646f 100644
--- a/wger/core/models/profile.py
+++ b/wger/core/models/profile.py
@@ -523,8 +523,8 @@ by the US Department of Agriculture. It is extremely complete, with around
"""
if (
not WeightEntry.objects.filter(user=self.user).exists() or (
- datetime.date.today() - WeightEntry.objects.filter(user=self.user).latest().date
- > datetime.timedelta(days=3)
+ datetime.date.today() - WeightEntry.objects.filter(user=self.user).latest().date >
+ datetime.timedelta(days=3)
)
):
entry = WeightEntry()
diff --git a/wger/settings_global.py b/wger/settings_global.py
index ec92e6279..8ea2a3da1 100644
--- a/wger/settings_global.py
+++ b/wger/settings_global.py
@@ -69,7 +69,7 @@ INSTALLED_APPS = (
'wger.measurements',
# reCaptcha support, see https://github.com/praekelt/django-recaptcha
- 'captcha',
+ 'django_recaptcha',
# The sitemaps app
'django.contrib.sitemaps',