From 40c3276c3cd398fe13f28826c998b5924fee82f4 Mon Sep 17 00:00:00 2001 From: imperosol Date: Mon, 29 Sep 2025 17:43:50 +0200 Subject: [PATCH] remove spaces from autocomplete selects --- .../core/widgets/autocomplete_select.jinja | 44 ++++++++++--------- counter/templates/counter/counter_click.jinja | 8 ++-- 2 files changed, 27 insertions(+), 25 deletions(-) diff --git a/core/templates/core/widgets/autocomplete_select.jinja b/core/templates/core/widgets/autocomplete_select.jinja index 8756dee5..bcdf3a76 100644 --- a/core/templates/core/widgets/autocomplete_select.jinja +++ b/core/templates/core/widgets/autocomplete_select.jinja @@ -1,23 +1,25 @@ -{% for js in statics.js %} - -{% endfor %} -{% for css in statics.css %} - -{% endfor %} - -<{{ component }} name="{{ widget.name }}" {% include "django/forms/widgets/attrs.html" %}> -{% for group_name, group_choices, group_index in widget.optgroups %} - {% if group_name %} - - {% endif %} - {% for widget in group_choices %} - {% include widget.template_name %} +{% spaceless %} + {% for js in statics.js %} + {% endfor %} - {% if group_name %} - + {% for css in statics.css %} + + {% endfor %} + + <{{ component }} name="{{ widget.name }}" {% include "django/forms/widgets/attrs.html" %}> + {% for group_name, group_choices, group_index in widget.optgroups %} + {% if group_name %} + + {% endif %} + {% for widget in group_choices %} + {% include widget.template_name %} + {% endfor %} + {% if group_name %} + + {% endif %} + {% endfor %} + {% if initial %} + {{ initial }} {% endif %} -{% endfor %} -{% if initial %} - {{ initial }} -{% endif %} - \ No newline at end of file + +{% endspaceless %} \ No newline at end of file diff --git a/counter/templates/counter/counter_click.jinja b/counter/templates/counter/counter_click.jinja index c1ecbe16..65e782da 100644 --- a/counter/templates/counter/counter_click.jinja +++ b/counter/templates/counter/counter_click.jinja @@ -67,13 +67,13 @@ - {% for category in categories.keys() %} + {%- for category in categories.keys() -%} - {% for product in categories[category] %} + {%- for product in categories[category] -%} - {% endfor %} + {%- endfor -%} - {% endfor %} + {%- endfor -%}