Skip to content

Commit

Permalink
Added 'limit' and 'offset' unit tests, one of which fails in MySQL 3 …
Browse files Browse the repository at this point in the history
…(refs #350)

git-svn-id: http://code.djangoproject.com/svn/django/trunk@540 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information
adrianholovaty committed Aug 19, 2005
1 parent 00c6aca commit 9180112
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tests/testapp/models/ordering.py
Expand Up @@ -48,4 +48,12 @@ def __repr__(self):
[Article 1, Article 2, Article 3, Article 4]
>>> articles.get_list(order_by=['pub_date', '-headline'])
[Article 1, Article 3, Article 2, Article 4]
# Use the "limit" parameter to limit the results.
>>> articles.get_list(order_by=['headline'], limit=2)
[Article 1, Article 2]
# Use the "offset" parameter with "limit" to offset the result list.
>>> articles.get_list(order_by=['headline'], offset=1, limit=2)
[Article 2, Article 3]
"""

0 comments on commit 9180112

Please sign in to comment.