Options.get_latest_by
The name of an orderable field in the model, typically a DateField
, DateTimeField
, or IntegerField
. This specifies the default field to use in your model Manager
’s latest()
and earliest()
methods.
Example:
get_latest_by = "order_date"
See the latest()
docs for more.
Please login to continue.