As Brian Dant suggested, ORDER and DELETE should be added manually if they are to be included in the Layout
. My problem was that I also passed them to the Meta
class's `fields'.
class _OperatorForm(forms.ModelForm):
def __init__(self, *args, **kwargs):
super(_OperatorForm, self).__init__(*args, **kwargs)
self.helper = FormHelper(self)
self.helper.form_tag = False
self.helper.layout.extend(['ORDER', 'DELETE'])
self.helper.all().wrap_together(Div, css_class="operator-form")
class Meta:
model = ApplicationOperator
fields = tuple(fields_list)