use jinja's built in tojson filter

This commit is contained in:
Andrew Croce
2018-08-31 09:08:35 -04:00
parent c45e643522
commit 0df7c0f56a
2 changed files with 1 additions and 4 deletions

View File

@@ -4,7 +4,7 @@
{% macro Selector(field, default_label='Select an option') -%}
<selector
v-bind:choices='{{ field.choices | toJson }}'
v-bind:choices='{{ field.choices | tojson }}'
default-label='{{ default_label }}'
{% if field.data %}initial-choice='{{ field.data }}'{% endif %}
{% if field.errors %}v-bind:initial-errors='{{ field.errors }}'{% endif %}