diff --git a/django/db/models/base.py b/django/db/models/base.py
index 5dd11a9..ff08552 100644
|
a
|
b
|
class Model(object):
|
| 410 | 410 | return force_unicode(dict(field.choices).get(value, value), strings_only=True) |
| 411 | 411 | |
| 412 | 412 | def _get_next_or_previous_by_FIELD(self, field, is_next, **kwargs): |
| | 413 | if not self.pk: |
| | 414 | raise ValueError, "get_next/get_previous cannot be used on unsaved objects." |
| 413 | 415 | op = is_next and 'gt' or 'lt' |
| 414 | 416 | order = not is_next and '-' or '' |
| 415 | 417 | param = smart_str(getattr(self, field.attname)) |
diff --git a/docs/db-api.txt b/docs/db-api.txt
index c94eb00..b8923c8 100644
|
a
|
b
|
described in `Field lookups`_ above.
|
| 2207 | 2207 | |
| 2208 | 2208 | Note that in the case of identical date values, these methods will use the ID |
| 2209 | 2209 | as a fallback check. This guarantees that no records are skipped or duplicated. |
| 2210 | | For a full example, see the `lookup API sample model`_. |
| | 2210 | That also means you cannot use those methods on unsaved objects. For a full |
| | 2211 | example, see the `lookup API sample model`_. |
| 2211 | 2212 | |
| 2212 | 2213 | .. _lookup API sample model: ../models/lookup/ |
| 2213 | 2214 | |