I am trying to get the last object of the Django model, but cannot succeed.
None of them work:
obj = Model.objects.filter(testfield=12).latest()
obj = Model.objects.latest().filter(testfield=12)
python django django-models django-queryset
doniyor Mar 28 '13 at 6:37 2013-03-28 06:37
source share