diff options
author | luxagraf <sng@luxagraf.net> | 2022-02-14 21:04:44 -0500 |
---|---|---|
committer | luxagraf <sng@luxagraf.net> | 2022-02-14 21:04:44 -0500 |
commit | 5383c565c0a3177330b41190483100707aa436a1 (patch) | |
tree | c8642b335e19447f01bdb90f1a4e6ee89d9da308 /app | |
parent | a2a635faeb01dbe213246e94c142ea1b69eb4964 (diff) |
lib: fixed django 4 bugs in comments
Diffstat (limited to 'app')
-rw-r--r-- | app/lib/django_comments/forms.py | 6 |
1 files changed, 3 insertions, 3 deletions
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"], |