django-constance
django-constance copied to clipboard
Collapse fieldsets when I am using Ordered dict
Describe the problem
I want to "collapse" my fieldsets in the same with OrderedDict. How can I do it?
System configuration
- Django version: 2.2
- Python version: 3.6
I'm also wondering this
Using the General Options example from the docs: https://django-constance.readthedocs.io/en/latest/#ordered-fields-in-django-admin
Think of the OrderedDict() as a collection of tuples where the first element will be the fieldset name, and the second element will be a dict that can contain the "fields" key and the "collapse" key.
CONSTANCE_CONFIG_FIELDSETS = OrderedDict(
[
(
"General Options",
(
{
"fields": ("SITE_NAME", "SITE_DESCRIPTION"),
"collapse": True,
}
),
),
("Theme Options", ("THEME",)),
]
)