Django crispy-forms, BaseGenericInlineFormSet & allow_delete

前端 未结 1 582
予麋鹿
予麋鹿 2021-01-05 09:52

I came across a question while working with django-crispy-forms for which I\'m unable to get an answer. I have a rather complex form layout, everything works extremly nice w

相关标签:
1条回答
  • 2021-01-05 10:23

    Stupid me - figured it out.. The delete field is referenced as "DELETE". (note the capital letters...)

        base_layout = Row(
                Column(
                       Field('name', css_class='input-small'),
                       css_class='span3'
                       ),
                Column(
                       Field('url', css_class='input-xlarge'),
                       Field('DELETE', css_class='input-small'),
                       css_class='span4'
                       ),
                css_class='row relation-row',
        )
    
    0 讨论(0)
提交回复
热议问题