id,summary,reporter,owner,description,type,status,component,version,severity,resolution,keywords,cc,stage,has_patch,needs_docs,needs_tests,needs_better_patch,easy,ui_ux 18875,Document that models.Options.get_latest_by supports integers,Adam Nelson,Dan Loewenherz,"In the documentation (https://docs.djangoproject.com/en/dev/ref/models/options/#django.db.models.Options.get_latest_by) , models.Options.get_latest_by specifies that !DateField and !DateTimeField are the only types supported for get_latest_by. In fact, any orderable field type is supported (https://github.com/django/django/blob/master/django/db/models/query.py#L477). The documentation should simply replace ""The name of a DateField or DateTimeField in the model."" with ""The name of a field in the model - typically a DateField, DateTimeField, or IntegerField."" Using get_latest_by('id') is very useful for large tables where reverse sorting by 'id' is a proxy for latest.",Cleanup/optimization,closed,Documentation,1.4,Normal,fixed,,,Accepted,1,0,0,0,1,0