diff options
| author | Étienne Loks <etienne.loks@iggdrasil.net> | 2025-03-26 15:26:20 +0100 |
|---|---|---|
| committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2025-10-24 18:32:21 +0200 |
| commit | b98b3004bb1a47674c9595a5d674dc4ba83344c8 (patch) | |
| tree | 8c382fb22ff3a8ddbf94dd69ad1a3a81f96cba7a /bootstrap_datepicker/widgets.py | |
| parent | 3b8d21e5bbee1ba59152ba6abc6ab73432fe611f (diff) | |
| download | Ishtar-b98b3004bb1a47674c9595a5d674dc4ba83344c8.tar.bz2 Ishtar-b98b3004bb1a47674c9595a5d674dc4ba83344c8.zip | |
♻️ django 3.2 deprecation: force_text -> force_str - templates: remove ifequal ; PIL: Image.ANTIALIAS -> Image.Resampling.LANCZOS
Diffstat (limited to 'bootstrap_datepicker/widgets.py')
| -rw-r--r-- | bootstrap_datepicker/widgets.py | 6 |
1 files changed, 3 insertions, 3 deletions
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): |
