#21908 closed Cleanup/optimization (fixed)
Misleading documentation in ModelAdmin.get_inline_instances
Reported by: | Owned by: | avendael | |
---|---|---|---|
Component: | Documentation | Version: | 1.6 |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Accepted | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | yes | UI/UX: | no |
Description
The documentation for this method seems a little sparse:
It's not actually clear that you need to instantiate the inline classes in this manner:
return [inline(self.model, self.admin_site) for inline in self.inlines]
(Obviously, that is without filtering).
I'm happy to submit a documentation patch, if it is likely to be accepted.
Attachments (1)
Change History (8)
comment:1 by , 11 years ago
Component: | contrib.admin → Documentation |
---|---|
Triage Stage: | Unreviewed → Accepted |
Type: | Uncategorized → Cleanup/optimization |
comment:2 by , 11 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
by , 11 years ago
Attachment: | patch.diff added |
---|
Added description of how to instantiate inline instances
comment:3 by , 11 years ago
I'm not sure if my patch is good enough. It's my first time to contribute to django :)
comment:4 by , 11 years ago
Your patch is close, however fyi it uses a single colon where a double-colon should be used. A double colon indicates that the next block is a code sample.
comment:5 by , 11 years ago
Has patch: | set |
---|
comment:6 by , 11 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Sure, I'll be happy to review your patch.