]> git.0d.be Git - chloro.git/blobdiff - chloro/monkeypatch.py
trivial: apply new pre-commit configuration
[chloro.git] / chloro / monkeypatch.py
index 127dc86fab96a030a744bbb61d586e2e4183d6f6..7802236d76082610575b3634405685328be1e43b 100644 (file)
@@ -20,7 +20,7 @@ from ckeditor.image import pillow_backend
 from django.forms.utils import flatatt
 from django.template.loader import render_to_string
 from django.urls import reverse
-from django.utils.encoding import force_text
+from django.utils.encoding import force_str
 from django.utils.html import conditional_escape
 from django.utils.safestring import mark_safe
 from django.utils.translation import get_language
@@ -43,7 +43,7 @@ def ckeditor_render(self, name, value, attrs=None, renderer=None):
 
     # Force to text to evaluate possible lazy objects
     external_plugin_resources = [
-        [force_text(a), force_text(b), force_text(c)] for a, b, c in self.external_plugin_resources
+        [force_str(a), force_str(b), force_str(c)] for a, b, c in self.external_plugin_resources
     ]
 
     return mark_safe(
@@ -51,7 +51,7 @@ def ckeditor_render(self, name, value, attrs=None, renderer=None):
             'ckeditor/widget.html',
             {
                 'final_attrs': flatatt(final_attrs),
-                'value': conditional_escape(force_text(value)),
+                'value': conditional_escape(force_str(value)),
                 'id': final_attrs['id'],
                 'config': ckeditor.widgets.json_encode(self.config),
                 'external_plugin_resources': ckeditor.widgets.json_encode(external_plugin_resources),