1
0
mirror of https://github.com/django/django.git synced 2025-06-05 03:29:12 +00:00

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

This commit is contained in:
Dan Loewenherz 2012-09-07 11:34:15 -04:00
parent 39aa8901e1
commit 09e3d364b9

View File

@ -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::