update create

This commit is contained in:
Daniel Tsvetkov 2020-06-08 13:40:58 +02:00
parent 4ef7da556c
commit f5e7f22f16

View File

@ -9,7 +9,7 @@
<option selected="selected">Choose...</option>
[%- endif %]
{%- for sub_instance in model_views.[[ column.name ]].model.query.all() %}
<option value="{{ sub_instance.id }}" {% if instance and instance.id == sub_instance.id %}selected="selected"{% endif %}>{{ sub_instance.name }}</option>
<option value="{{ sub_instance.id }}" {% if instance and instance.id == sub_instance.id %}selected="selected"{% endif %}>{{ sub_instance }}</option>
{%- endfor %}
</select>
[%- elif column.type in ['choice', ] %]