0👍
✅
The only solution I managed to find that still allowed me to separate each row of the form was doing the following:
<form method="POST" action="{% url some_url %}">
{% csrf_token %}
{{ formset.as_ul }}
<div class="actions">
<input class="button submit focus" type="submit" value="{% trans "Save" %}" />
</div>
</form>
… the key piece being the {{ formset.as_ul }}
instead of iterating through each field.
As for why the other listed solution (or the solution in the documentation) didn’t work, I will remain baffled.
0👍
You have to put the field label inside a <label>
tag. So:
<div>
<label for="id_{{field.html_name}}">{{field.label}}:</label>
{{ field }}
</div>
- [Django]-How to pass args to a signal
- [Django]-How to serialize recursive relationship with self in Django REST Framework?
- [Django]-Setting global variables with Cactus App for Mac
Source:stackexchange.com