Alignment with grappelli docs only need to add "classes": ("grp-collapse grp-closed")
eg
class EntryOptions(admin.ModelAdmin): ... fieldsets = ( ('', { 'fields': ('title', 'subtitle', 'slug', 'pub_date', 'status',), }), ('Flags', { 'classes': ('grp-collapse grp-closed',), 'fields' : ('flag_front', 'flag_sticky', 'flag_allow_comments',), }),
Note: if you use grappelli version <2.4, use "grp-closed" 'collapse-closed' * instead; in fact, "collapse-close" still works, but it is recommended to use new classes
source share