Fixed #724 -- Ensured get_next_by_FOO() and get_previous_by_FOO() methods don't skip or duplicate any records in the case of duplicate values. Thanks for reporting the bug, mattycakes@gmail.com

git-svn-id: http://code.djangoproject.com/svn/django/trunk@1155 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Adrian Holovaty 2005-11-10 05:36:41 +00:00
parent 28bce49e59
commit e3e37ed120
3 changed files with 44 additions and 16 deletions

View file

@ -515,6 +515,12 @@ previous object with respect to the date field, raising the appropriate
Both methods accept optional keyword arguments, which should be in the format
described in "Field lookups" above.
Note that in the case of identical date values, these methods will use the ID
as a fallback check. This guarantees that no records are skipped or duplicated.
For a full example, see the `lookup API sample model_`.
.. _lookup API sample model: http://www.djangoproject.com/documentation/models/lookup/
get_FOO_filename()
------------------