{% for key,value in config.items %}
<button type="button" class="btn btn-info btn-xs" data-toggle="modal" data-target='#'{{key}}><i class="fa fa-pencil-square-o" aria-hidden="true"></i></button>
<div class="modal fade" id={{ key}} role="dialog">
<div class="modal-dialog">
<!-- Modal content-->
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">×</button>
<h4 class="modal-title">{{key}}</h4>
</div>
<div class="modal-body">
<p>Some text in the modal.</p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
{% endfor %}
//我想通过{{key}}调用每个元素,以便我可以根据循环值显示所有值。有人建议我如何解决这个问题