开发者

Django Admin form - how to show two "fieldsets" horizontally in a form?

开发者 https://www.devze.com 2022-12-29 12:43 出处:网络
How to开发者_JS百科 show two \"fieldsets\" horizontally in a form? Note: I don\'t mean show multiple fields horizontally, but multiple fieldsets.

How to开发者_JS百科 show two "fieldsets" horizontally in a form?

Note: I don't mean show multiple fields horizontally, but multiple fieldsets.

Thank you!


Each fieldset, in addition to the tuple of fields, also takes a classes argument which is a list of CSS classes to apply to the fieldset. You can use this in conjunction with a custom stylesheet loaded via the ModelAdmin media class to position things via CSS.


I've never tried it, but look into Overriding Admin Templates (specifically change_form.html and the part that iterates through fieldsets).

0

精彩评论

暂无评论...
验证码 换一张
取 消