summaryrefslogtreecommitdiff
path: root/bootstrap_datepicker/widgets.py
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2025-03-26 15:26:20 +0100
committerÉtienne Loks <etienne.loks@iggdrasil.net>2025-07-21 15:07:41 +0200
commit62b34d0afb55a5c5c7bc1da22f0c0d293ee3936d (patch)
treed4bbb36fbd4f23f3fe406cefcc3be0ba396d981e /bootstrap_datepicker/widgets.py
parent18556dec8d2989f715d2251342aa4368fda857c8 (diff)
downloadIshtar-62b34d0afb55a5c5c7bc1da22f0c0d293ee3936d.tar.bz2
Ishtar-62b34d0afb55a5c5c7bc1da22f0c0d293ee3936d.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.py6
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):