I came across a question while working with django-crispy forms for which I cannot get an answer. I have a rather complicated layout form, everything works very nicely with cripy forms.
One part of the form uses a common built-in set of forms. This also works, but my problem is that I cannot figure out how to access the delete-checkbox checkbox (if can_delete = True is present)
The corresponding code looks something like this:
class BaseReleaseReleationFormSet(BaseGenericInlineFormSet): def __init__(self, *args, **kwargs): self.instance = kwargs['instance'] super(BaseReleaseReleationFormSet, self).__init__(*args, **kwargs) self.helper = FormHelper() self.helper.form_id = "id_relation_form" self.helper.form_class = 'form-horizontal' self.helper.form_method = 'post' self.helper.form_action = '' self.helper.form_tag = False base_layout = Row( Column( Field('name', css_class='input-small'),
The name field and url are rendered with crispy forms as desired, but the delete-check flag appears at the end of the form. And I canβt access it in the layout.
Does anyone know how to solve this problem? Any tips? Thanks in advance!
ohrstrom
source share