newsletters: add compatibility with django 1.11 widget rendering (#21083)

This commit is contained in:
Frédéric Péters 2018-01-10 22:46:14 +01:00
parent 72b27ebab4
commit 00dac12b5b
1 changed files with 3 additions and 1 deletions

View File

@ -25,7 +25,9 @@
<td>{{ field.label }}</td>
{% for id, theme in form.themes %}<td data-id="{{ id }}">
{% for w in field %}
{% if w.choice_value == id %}{{ w }}{% endif %}
{% with choice_value=w.data.value|default:w.choice_value %}
{% if choice_value == id %}{{ w }}{% endif %}
{% endwith %}
{% endfor %}
</td>
{% endfor %}