#11235 closed (fixed)
minor error in queryset documentation
Reported by: | anonymous | Owned by: | nobody |
---|---|---|---|
Component: | Documentation | Version: | dev |
Severity: | Keywords: | ||
Cc: | Triage Stage: | Ready for checkin | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
There is a minor error in the second example of using the 'select' parameter to the 'extra' queryset method at
http://docs.djangoproject.com/en/dev/ref/models/querysets/#extra-select-none-where-none-params-none-tables-none-order-by-none-select-params-none
The second example's "resulting SQL" is missing "AS entry_count" for its subquery.
It should read as follows:
SELECT blog_blog.*, (SELECT COUNT(*) FROM blog_entry WHERE blog_entry.blog_id = blog_blog.id) AS entry_count
FROM blog_blog;
Currently "AS entry_count" is missing. (The example is intended to create an entry_count attribute).
Attachments (1)
Change History (5)
by , 15 years ago
Attachment: | 11235.diff added |
---|
comment:1 by , 15 years ago
Component: | Uncategorized → Documentation |
---|---|
Has patch: | set |
Triage Stage: | Unreviewed → Ready for checkin |
Version: | 1.0 → SVN |
comment:2 by , 15 years ago
comment:3 by , 15 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
(In[ 11239]) Fixed #11235 -- Added a missing clause from some sample SQL in the queryset docs.