Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#20762 closed Cleanup/optimization (fixed)

Clarify that add_fieldsets is not a standard ModelAdmin attribute

Reported by: vim@… Owned by: nobody
Component: Documentation Version: 1.5
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

The ModelAdmin.add_fieldsets attribute is not documented in the reference section for ModelAdmin options (ref/contrib/admin/#modeladmin-options), although it does appear in the example code for using a custom user model (topics/auth/customizing/#a-full-example), at the very end.

This is really useful. I think it should be documented more clearly, where people are likely to look for it.

Attachments (1)

20762.diff (587 bytes ) - added by Tim Graham 11 years ago.

Download all attachments as: .zip

Change History (8)

comment:1 by loic84, 11 years ago

Resolution: invalid
Status: newclosed

UserAdmin.add_fieldsets is neither a public API nor a generic mechanism, it's an implementation detail of the UserAdmin class.

It wouldn't work on any other ModelAdmin unless you implement a custom ModelAdmin.get_fieldsets() that takes advantage of it.

comment:2 by Tim Graham, 11 years ago

I was going to suggest we add a comment to that effect in topics/auth/customizing/#a-full-example

comment:3 by loic84, 11 years ago

@timo: it's actually easier to document since we've fixed #18681 because the get_form() override is no longer necessary.

Unless of course you really need a different form, but in that case you can still leave out the flatten_fieldsets() bit.

by Tim Graham, 11 years ago

Attachment: 20762.diff added

comment:4 by Tim Graham, 11 years ago

Resolution: invalid
Status: closednew
Summary: ModelAdmin.add_fieldsets missing from reference documentationClarify that add_fieldsets is not a standard ModelAdmin attribute
Type: BugCleanup/optimization

comment:5 by Tim Graham <timograham@…>, 11 years ago

Resolution: fixed
Status: newclosed

In dce8945ea63c636a71f3bc5d610dccebc08c52eb:

Fixed #20762 -- Clarified that add_fieldsets is not a standard ModelAdmin attribute.

comment:6 by Tim Graham <timograham@…>, 11 years ago

In cbfe56c856f9bb79fdd36d7e573c6156bb88720a:

[1.5.x] Fixed #20762 -- Clarified that add_fieldsets is not a standard ModelAdmin attribute.

Backport of dce8945ea6 from master

comment:7 by Tim Graham <timograham@…>, 11 years ago

In 579ca9ee8d3c47ba46385db6beb2318cea97b123:

[1.6.x] Fixed #20762 -- Clarified that add_fieldsets is not a standard ModelAdmin attribute.

Backport of dce8945ea6 from master

Note: See TracTickets for help on using tickets.
Back to Top