django crispy-forms inline forms

帅比萌擦擦* 提交于 2019-12-03 15:28:58

The inline forms you refer to, are known in Django as Formsets. If you want to know more about formsets, you can find them in the Django forms documentation.

Crispy supports rendering inline formsets, as described in the section 'Rendering Formsets'

Please note that formsets by default show 3 extra inline forms, allowing you to add three more objects. After saving, you again get three extra inline formsets to add even more.

If you want an 'add more' button like in the Django Admin, you will need to use some Javascript to dynamically add those rows.

If using class based views, you can use django-extra-views.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!