#19712 closed Cleanup/optimization (fixed)
admindocs Model reference is incomplete and wrongly described
Reported by: | Daniele Procida | Owned by: | nobody |
---|---|---|---|
Component: | Documentation | Version: | 1.4 |
Severity: | Normal | Keywords: | |
Cc: | timograham@… | Triage Stage: | Accepted |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
https://docs.djangoproject.com/en/dev/ref/contrib/admin/admindocs/#model-reference
The models section of the admindocs page describes each model in the system along with all the fields and methods available on it
That's only true of methods that are not properties, and don't have multiple arguments.
I can see why the latter methods are not included (they won't always be available in templates), but I can see no reason why properties should be excluded.
Finally, the admindocs say: "Fields on <whatever> objects" - wouldn't "attributes" be more accurate?
Attachments (1)
Change History (7)
comment:1 by , 12 years ago
Component: | Uncategorized → Documentation |
---|---|
Triage Stage: | Unreviewed → Accepted |
Type: | Uncategorized → Cleanup/optimization |
by , 12 years ago
Attachment: | 19712.diff added |
---|
comment:2 by , 12 years ago
Cc: | added |
---|---|
Has patch: | set |
comment:3 by , 12 years ago
Say you visit /admin/doc/models/auth.user/
.
It will say there: <h1>Fields on User objects</h1>
.
However, it doesn't just list fields, it lists all kinds of attributes of User
, including:
- methods
- model fields
- some methods on relations, such as count() and all()
but not:
- methods decorated with @property
- methods beginning with
_
- particular methods including
get_absolute_url()
So it's just a bit misleading, that's all.
comment:4 by , 12 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Added patch for the first clarification. Not sure what the "Finally" issue is referring to?