Django Admin - 将崩溃添加到字段集,但是它已经开始扩展 [英] Django Admin - add collapse to a fieldset, but have it start expanded

查看:83
本文介绍了Django Admin - 将崩溃添加到字段集,但是它已经开始扩展的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法使字段集可折叠,但是开始扩展?当您添加到场集类的崩溃时,它会获得功能,但是开始折叠。我看了一下显示/隐藏字段集内容的JS,但是看起来并不像我想要的那样做,所以我假设我必须滚动我的拥有。

解决方案

django-grappelli 提供这个功能之一。以下是有关该功能的维基页面(带截图)。 p>

Is there a way to make a fieldset collapsible, but start expanded? When you add collapse to the fieldset classes, it gets the functionality but starts collapsed. I've taken a look at the JS that shows/hides the fieldset content, but it doesn't look like there's anything in there to do what I'd like it to, so I'm assuming I'll have to roll my own. Just wanted to check before I went through that effort.

解决方案

django-grappelli provides this as one of the features. Here's the wiki page about that feature (with screenshots).

这篇关于Django Admin - 将崩溃添加到字段集,但是它已经开始扩展的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆