[extensions-web] python3: update django.utils method name



commit 953e8e9525d4e6c70978dd772565e258e076e36a
Author: Yuri Konotopov <ykonotopov gnome org>
Date:   Fri Jan 11 21:31:14 2019 +0400

    python3: update django.utils method name

 sweettooth/ratings/forms.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/sweettooth/ratings/forms.py b/sweettooth/ratings/forms.py
index 2b3afe4..49f3635 100644
--- a/sweettooth/ratings/forms.py
+++ b/sweettooth/ratings/forms.py
@@ -5,7 +5,7 @@ from django.forms import fields, widgets
 from django.conf import settings
 from django.contrib.contenttypes.models import ContentType
 from django_comments.forms import CommentForm
-from django.utils.encoding import force_unicode
+from django.utils.encoding import force_text
 from django.utils.safestring import mark_safe
 
 from sweettooth.ratings.models import RatingComment
@@ -32,7 +32,7 @@ class RatingCommentForm(CommentForm):
     def get_comment_create_data(self):
         return dict(
             content_type = ContentType.objects.get_for_model(self.target_object),
-            object_pk    = force_unicode(self.target_object._get_pk_val()),
+            object_pk    = force_text(self.target_object._get_pk_val()),
             comment      = self.cleaned_data["comment"],
             rating       = self.cleaned_data["rating"],
             submit_date  = datetime.datetime.now(),


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]