我有以下使用crispy-forms的django表单:
<div class="panel panel-default">
<div class="panel-heading">
<h2 class="panel-title">TEAM SELECTION</h2>
</div>
<div class="panel-body">
<form action="" method="post">
{% csrf_token %}
<div>{{ form.non_field_errors }}</div>
<div class="col-xs-12 col-sm-5 col-md-5 col-lg-5">{{ form.team1|as_crispy_field }}</div>
<div class="col-xs-12 col-sm-5 col-md-5 col-lg-5">{{ form.team2|as_crispy_field }}</div>
<div class="col-xs-12 col-sm-2 col-md-2 col-lg-2"><button type="submit" class="btn btn-primary btn-block"; margin-bottom: 2cm;>Submit</button></div>
</form>
</div>
</div>
除{{ form.non_field_errors }}
部分外,一切看起来都很棒。它看起来像子弹列表如下:
有谁知道如何让{{ form.non_field_errors }}
看起来像表格的其他部分一样令人兴奋?