Skip to content

Commit

Permalink
specify any orderable field can be specified in get_latest_by, closes…
Browse files Browse the repository at this point in the history
… #18875
  • Loading branch information
dlo committed Sep 7, 2012
1 parent 39aa890 commit 09e3d36
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions docs/ref/models/options.txt
Expand Up @@ -83,9 +83,10 @@ Django quotes column and table names behind the scenes.


.. attribute:: Options.get_latest_by .. attribute:: Options.get_latest_by


The name of a :class:`DateField` or :class:`DateTimeField` in the model. The name of an orderable field in the model, typically a :class:`DateField`,
This specifies the default field to use in your model :class:`Manager`'s :class:`DateTimeField`, or :class:`IntegerField`. This specifies the default
:class:`~QuerySet.latest` method. field to use in your model :class:`Manager`'s :class:`~QuerySet.latest`
method.


Example:: Example::


Expand Down

0 comments on commit 09e3d36

Please sign in to comment.