forms.py
StockroomWorkerFormSet = inlineformset_factory(Stockroom, WorkerType, extra=0, can_delete=True)
views.py
class StockroomEditView(UpdateView):
model = Stockroom
form_class = StockroomWorkerFormSet
temlate_name = 'stock/edit.html'
def get_success_url(self):
return self.get_object().get_absolute_url()
edit.html
{% csrf_token %}
{{ form.management_form }}
{% for field in form %}
{{ field }}
{% endfor %}