summaryrefslogtreecommitdiff
path: root/ishtar_common
diff options
context:
space:
mode:
Diffstat (limited to 'ishtar_common')
-rw-r--r--ishtar_common/models.py2
-rw-r--r--ishtar_common/templates/blocks/bs_formset_snippet.html4
-rw-r--r--ishtar_common/templates/blocks/comma_list.html2
-rw-r--r--ishtar_common/templates/ishtar/blocks/shortcut_menu.html2
-rw-r--r--ishtar_common/widgets.py8
5 files changed, 9 insertions, 9 deletions
diff --git a/ishtar_common/models.py b/ishtar_common/models.py
index 4ae11a777..06aa2a67c 100644
--- a/ishtar_common/models.py
+++ b/ishtar_common/models.py
@@ -531,7 +531,7 @@ class ImageModel(models.Model, ImageContainerModel):
def create_thumb(self, image, size):
"""Returns the image resized to fit inside a box of the given size"""
- image.thumbnail(size, Image.ANTIALIAS)
+ image.thumbnail(size, Image.Resampling.LANCZOS)
temp = BytesIO()
image.save(temp, "jpeg")
temp.seek(0)
diff --git a/ishtar_common/templates/blocks/bs_formset_snippet.html b/ishtar_common/templates/blocks/bs_formset_snippet.html
index cfc9bb37b..8ed958d1c 100644
--- a/ishtar_common/templates/blocks/bs_formset_snippet.html
+++ b/ishtar_common/templates/blocks/bs_formset_snippet.html
@@ -19,9 +19,9 @@
{% csrf_token %}
{% for field in form.visible_fields %}
- {% ifequal field.name "DELETE" %}{% with bs_col_width='col-2' %}{% include "blocks/bs_field_snippet.html" %}{% endwith %}
+ {% if field.name == "DELETE" %}{% with bs_col_width='col-2' %}{% include "blocks/bs_field_snippet.html" %}{% endwith %}
{% else %}{% with bs_col_width='col-3' %}{% include "blocks/bs_field_snippet.html" %}{% endwith %}
- {% endifequal %}
+ {% endif %}
{% endfor %}
{% if form.extra_render %}
diff --git a/ishtar_common/templates/blocks/comma_list.html b/ishtar_common/templates/blocks/comma_list.html
index 12fcd2b41..60aa6bacc 100644
--- a/ishtar_common/templates/blocks/comma_list.html
+++ b/ishtar_common/templates/blocks/comma_list.html
@@ -1 +1 @@
-{% load i18n %}{% if not forloop.last %}{% ifequal forloop.revcounter 2 %} {% trans "and" %} {% else %}{% trans ", "%}{% endifequal %}{% else %}{% trans "." %}{% endif %}
+{% load i18n %}{% if not forloop.last %}{% if forloop.revcounter == 2 %} {% trans "and" %} {% else %}{% trans ", "%}{% endif %}{% else %}{% trans "." %}{% endif %}
diff --git a/ishtar_common/templates/ishtar/blocks/shortcut_menu.html b/ishtar_common/templates/ishtar/blocks/shortcut_menu.html
index 447deb573..1253aa12a 100644
--- a/ishtar_common/templates/ishtar/blocks/shortcut_menu.html
+++ b/ishtar_common/templates/ishtar/blocks/shortcut_menu.html
@@ -27,7 +27,7 @@
<div class="col-sm-6">
<select class='{{main_cls}} chosen-select' id='current_{{model_name}}'>
<option class='normal' value=''>--</option>
- {% for val, label, selected, cls in items %}<option{% if cls %} class='{{cls}}'{% endif %} value='{{val}}'{% if selected %} selected="selected"{% endif %}>{% ifequal cls 'basket' %}&#xf291; {% endifequal %}{% ifequal cls 'green' %}&#xf058; {% endifequal %}{% ifequal cls 'orange' %}&#xf06a; {% endifequal %}{% ifequal cls 'red' %}&#xf071; {% endifequal %}{{label}}</option>
+ {% for val, label, selected, cls in items %}<option{% if cls %} class='{{cls}}'{% endif %} value='{{val}}'{% if selected %} selected="selected"{% endif %}>{% if cls == 'basket' %}&#xf291; {% endif %}{% if cls == 'green' %}&#xf058; {% endif %}{% if cls == 'orange' %}&#xf06a; {% endif %}{% if cls == 'red' %}&#xf071; {% endif %}{{label}}</option>
{% endfor %}</select>
</div>
{% with 'show-'|add:model_name as model_url%}
diff --git a/ishtar_common/widgets.py b/ishtar_common/widgets.py
index 1c0b23c13..54c832d38 100644
--- a/ishtar_common/widgets.py
+++ b/ishtar_common/widgets.py
@@ -33,7 +33,7 @@ from django.forms.widgets import (
from django.template import loader
from django.template.defaultfilters import slugify
from django.urls import reverse, NoReverseMatch
-from django.utils.encoding import smart_text
+from django.utils.encoding import smart_str
from django.utils.functional import lazy
from django.utils.html import escape
from django.utils.safestring import mark_safe
@@ -806,7 +806,7 @@ class JQueryAutoComplete(forms.TextInput):
hiddens = []
selects = []
if type(value) not in (list, tuple):
- values = str(escape(smart_text(value)))
+ values = str(escape(smart_str(value)))
values = values.replace("[", "").replace("]", "")
values = values.split(",")
else:
@@ -1008,7 +1008,7 @@ class JQueryTown(forms.TextInput):
hiddens = []
selects = []
if type(value) not in (list, tuple):
- values = str(escape(smart_text(value)))
+ values = str(escape(smart_str(value)))
values = values.replace("[", "").replace("]", "")
values = values.split(",")
else:
@@ -1134,7 +1134,7 @@ class JQueryPersonOrganization(forms.TextInput):
hiddens = []
selects = []
if type(value) not in (list, tuple):
- values = str(escape(smart_text(value)))
+ values = str(escape(smart_str(value)))
values = values.replace("[", "").replace("]", "")
values = values.split(",")
else: