1👍
As described in the formset documention you must add the form tag manually. This is not very different from what you do when displaying a single form.
It appears that you are iterating through the formset and displayig them one by one. That means you must also add the management form
<form method="post" action="">
{{ formset.management_form }}
<div ='container'>
{% for form in formset %}
<div class='row'>{{form}} <input type="submit" value="Update" /></div>
{% endfor %}
<div>
</form>
Or you will get errors about a missing or misconfigured management form.
1👍
Note that it does not include the tags, or a submit button. We’ll have to provide those ourselves in the template.
Read more: Working with Forms: Building a form in Django
The reason you are not getting the <form>
tag is because from a logical point of view a form validation can be handled anywhere in your application. That’s why you need to specify the form tag explicitly with the target url (good to use reverse(view_name)), method and other parameters.
- [Answered ]-Connect Django 1.11 to Mariadb Galera cluster
- [Answered ]-After change class function doesn't work
- [Answered ]-Don't fail if log files are unavailable
- [Answered ]-How to pass values for password_reset() in Django 1.10?
- [Answered ]-In Django, how to include template folder I have created with the base file named base.html on settings.py?