diff options
Diffstat (limited to 'docs/topics')
| -rw-r--r-- | docs/topics/db/queries.txt | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/docs/topics/db/queries.txt b/docs/topics/db/queries.txt index b95173773b..b6263a9f42 100644 --- a/docs/topics/db/queries.txt +++ b/docs/topics/db/queries.txt @@ -361,6 +361,9 @@ every *second* object of the first 10:: >>> Entry.objects.all()[:10:2] +Further filtering or ordering of a sliced queryset is prohibited due to the +ambiguous nature of how that might work. + To retrieve a *single* object rather than a list (e.g. ``SELECT foo FROM bar LIMIT 1``), use a simple index instead of a slice. For example, this returns the first ``Entry`` in the database, after |
