#28352 closed Cleanup/optimization (fixed)
QuerySet.values_list() docs documentation doesn't show correct return type
Reported by: | Rich Elmes | Owned by: | Irindu Indeera |
---|---|---|---|
Component: | Documentation | Version: | 1.11 |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Accepted | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | yes |
Easy pickings: | yes | UI/UX: | no |
Description (last modified by )
The values()
documentation (docs/ref/models/querysets.txt) correctly shows the return type of the object:
>>> Entry.objects.values() <QuerySet [{'blog_id': 1, 'headline': 'First Entry', ...}, ...]>
whereas the values_list()
erroneously shows the return type as a list:
>>> Entry.objects.values_list('id', 'headline') [(1, 'First entry'), ...]
Simply wrapping <QuerySet> around the list shown might save others getting as confused as I did.
Change History (8)
comment:1 by , 7 years ago
Summary: | values_list documentation doesn't show return type which can be confusing → values_list documentation doesn't show correct return type which can be confusing |
---|
comment:2 by , 7 years ago
Description: | modified (diff) |
---|---|
Easy pickings: | set |
Summary: | values_list documentation doesn't show correct return type which can be confusing → QuerySet.values_list() docs documentation doesn't show correct return type |
Triage Stage: | Unreviewed → Accepted |
comment:3 by , 7 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:4 by , 7 years ago
comment:5 by , 7 years ago
Has patch: | set |
---|---|
Patch needs improvement: | set |
Version 0, edited 7 years ago by (next)
Note:
See TracTickets
for help on using tickets.
Hi Tim, I'd Like to work on this issue