From ef7c1e41ebdb280fda0219997babb4a3fc0ca7bd Mon Sep 17 00:00:00 2001 From: za Date: Sat, 16 Jul 2022 19:32:51 +0700 Subject: [PATCH] Replace uggettext_lazy with gettext_lazy to support Django 4.0 > django.utils.translation.ugettext(), ugettext_lazy(), ugettext_noop(), ungettext(), and ungettext_lazy() are removed. https://docs.djangoproject.com/en/4.0/releases/4.0/#features-removed-in-4-0 Django trac ticket: https://code.djangoproject.com/ticket/30165 --- snowpenguin/django/recaptcha2/fields.py | 2 +- snowpenguin/django/recaptcha2/templatetags/recaptcha2.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/snowpenguin/django/recaptcha2/fields.py b/snowpenguin/django/recaptcha2/fields.py index 6563e85..003c894 100644 --- a/snowpenguin/django/recaptcha2/fields.py +++ b/snowpenguin/django/recaptcha2/fields.py @@ -4,7 +4,7 @@ from django import forms from django.conf import settings from django.core.exceptions import ValidationError -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext_lazy as _ import requests diff --git a/snowpenguin/django/recaptcha2/templatetags/recaptcha2.py b/snowpenguin/django/recaptcha2/templatetags/recaptcha2.py index 7928662..0edf489 100644 --- a/snowpenguin/django/recaptcha2/templatetags/recaptcha2.py +++ b/snowpenguin/django/recaptcha2/templatetags/recaptcha2.py @@ -2,7 +2,7 @@ from django import template from django.conf import settings -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext_lazy as _ register = template.Library()