From 5383c565c0a3177330b41190483100707aa436a1 Mon Sep 17 00:00:00 2001 From: luxagraf Date: Mon, 14 Feb 2022 21:04:44 -0500 Subject: lib: fixed django 4 bugs in comments --- app/lib/django_comments/forms.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'app') diff --git a/app/lib/django_comments/forms.py b/app/lib/django_comments/forms.py index 7b7eafd..b4de54d 100644 --- a/app/lib/django_comments/forms.py +++ b/app/lib/django_comments/forms.py @@ -5,10 +5,10 @@ from django.conf import settings from django.contrib.contenttypes.models import ContentType from django.forms.utils import ErrorDict from django.utils.crypto import salted_hmac, constant_time_compare -from django.utils.encoding import force_text +from django.utils.encoding import force_str from django.utils.text import get_text_list from django.utils import timezone -from django.utils.translation import pgettext_lazy, ungettext, ugettext, ugettext_lazy as _ +from django.utils.translation import pgettext_lazy, ngettext, gettext, gettext_lazy as _ from . import get_model @@ -137,7 +137,7 @@ class CommentDetailsForm(CommentSecurityForm): """ return dict( content_type=ContentType.objects.get_for_model(self.target_object), - object_pk=force_text(self.target_object._get_pk_val()), + object_pk=force_str(self.target_object._get_pk_val()), user_name=self.cleaned_data["name"], user_email=self.cleaned_data["email"], user_url=self.cleaned_data["url"], -- cgit v1.2.3-70-g09d2