Django admin fieldset exclude or header field
I'm trying to create a new admin view that: 1. has a h开发者_C百科eader of some kind 2. excludes 3 of my fields
Fieldset gives me the header I want, but doesn't seem to support "exclude", and I have not been able to find a "header" field.
Is there: 1. a header field that I don't know about 2. a way to exclude fields within Fieldset?
You can't exclude things the way you want to, unfortunately. You'll have to verbosely list every field that you want to include, like this:
fieldsets = (
('Basic Information', {
'fields': ('first_name', 'last_name', 'address', )
}),
)
And so on!
精彩评论