我想要做的是根据表单的数量显示一个 div:
<div id="form-nav">
<div id="add-event">
<input type="submit" name="add_event" value="Add Event">
</div>
{% if formset.TOTAL_FORMS == 0 %}
<div id="save-next">
<input type="submit" name="coding_form_next" value="Save without Event">
</div>
{% elif %}
<div id="save-stay">
<input type="submit" name="coding_form_save" value="Save new Events">
</div>
{% endif %}
</div>
但是,我收到以下错误:
Unexpected end of expression in if tag.
我究竟做错了什么?