Kaydet (Commit) 09e3d364 authored tarafından Dan Loewenherz's avatar Dan Loewenherz

specify any orderable field can be specified in get_latest_by, closes #18875

üst 39aa8901
......@@ -83,9 +83,10 @@ Django quotes column and table names behind the scenes.
.. attribute:: Options.get_latest_by
The name of a :class:`DateField` or :class:`DateTimeField` in the model.
This specifies the default field to use in your model :class:`Manager`'s
:class:`~QuerySet.latest` method.
The name of an orderable field in the model, typically a :class:`DateField`,
:class:`DateTimeField`, or :class:`IntegerField`. This specifies the default
field to use in your model :class:`Manager`'s :class:`~QuerySet.latest`
method.
Example::
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment