Utilities related to django.contrib.admin fieldsets.
- filter_fieldsets(form, admin=None, fieldsets=None, exclude=None, exclude_collapsed=True)¶
This method allows us to filter fieldsets from a ModelAdmin to exclude fields (or an entire fieldset).
django.contrib.admin.ModelAdmin, optional) – The model admin to retrieve fieldsets from. If this argument is not provided,
fieldsetswill be used instead.
tuple, optional) – The fieldsets to use.
bool, optional) – Whether or not to exclude fieldsets marked as collapsed by default.
dict– An entry for each field set that should be rendered.
If a field set would have no rendered fields, it is not yielded.