given a standard model (called Image) with an autoset \'id\', how do I get the max id?
So far I\'ve tried:
max_id = Image.objects.all().aggregate(Max
Your logic is right, this will return the max id
res = Image.objects.filter().aggregate(max_id=Max('pk')) res.get('max_id')