开发者

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!

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜