#20762 closed Cleanup/optimization (fixed)
Clarify that add_fieldsets is not a standard ModelAdmin attribute
Reported by: | 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)
Change History (8)
comment:1 by , 11 years ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
comment:2 by , 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 , 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 , 11 years ago
Attachment: | 20762.diff added |
---|
comment:4 by , 11 years ago
Resolution: | invalid |
---|---|
Status: | closed → new |
Summary: | ModelAdmin.add_fieldsets missing from reference documentation → Clarify that add_fieldsets is not a standard ModelAdmin attribute |
Type: | Bug → Cleanup/optimization |
comment:5 by , 11 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
UserAdmin.add_fieldsets
is neither a public API nor a generic mechanism, it's an implementation detail of theUserAdmin
class.It wouldn't work on any other
ModelAdmin
unless you implement a customModelAdmin.get_fieldsets()
that takes advantage of it.