QuerySet documentation of slicing syntax misleading/incomplete
|Reported by:||adrian_nye||Owned by:||jacob|
|Has patch:||no||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
Doc says: "Use Python's array-slicing syntax to limit your QuerySet to a certain number of results."
Should say: "Use a subset of Python's array-slicing syntax to limit your QuerySet to a certain number of results."
Should also say: specifically mention that it doesn't accept negative indexes. [-1] does not work for example.
Would be nice: give an example of how to return the last (single) item in a queryset. A good example would be: return the item with the most
Change History (4)
comment:1 Changed 7 years ago by jacob
- milestone set to 1.1
- Needs documentation unset
- Needs tests unset
- Patch needs improvement unset
- Triage Stage changed from Unreviewed to Accepted
comment:2 Changed 6 years ago by jacob
- Owner changed from nobody to jacob
- Status changed from new to assigned
comment:3 Changed 6 years ago by jacob
- Resolution set to fixed
- Status changed from assigned to closed