From 62b34d0afb55a5c5c7bc1da22f0c0d293ee3936d Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Wed, 26 Mar 2025 15:26:20 +0100 Subject: ♻️ django 3.2 deprecation: force_text -> force_str - templates: remove ifequal ; PIL: Image.ANTIALIAS -> Image.Resampling.LANCZOS MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bootstrap_datepicker/widgets.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'bootstrap_datepicker/widgets.py') diff --git a/bootstrap_datepicker/widgets.py b/bootstrap_datepicker/widgets.py index b84006056..908b61efe 100644 --- a/bootstrap_datepicker/widgets.py +++ b/bootstrap_datepicker/widgets.py @@ -9,7 +9,7 @@ from django.forms.widgets import DateTimeInput from django.utils.safestring import mark_safe from django.utils import translation from django.utils.html import conditional_escape -from django.utils.encoding import force_text +from django.utils.encoding import force_str logger = logging.getLogger(__name__) @@ -144,7 +144,7 @@ class DatePicker(DateTimeInput): input_attrs = self.build_attrs(attrs, extra_attrs) if value != '': # Only add the 'value' attribute if a value is non-empty. - input_attrs['value'] = force_text(self.format_value(value)) + input_attrs['value'] = force_str(self.format_value(value)) input_attrs = {key: conditional_escape(val) for key, val in input_attrs.items()} if not self.picker_id: @@ -162,7 +162,7 @@ class DatePicker(DateTimeInput): icon_attrs=flatatt(icon_attrs)) js = self.js_template % dict( picker_id=picker_id, options=json_dumps(self.options or {})) - return mark_safe(force_text(html + js)) + return mark_safe(force_str(html + js)) class DateField(forms.DateField): -- cgit v1.2.3