Answers for "find the highest id in model django"

0

find the highest id in model django

latest_id = Model.objects.all().values_list('id', flat=True).order_by('-id').first()
Posted by: Guest on January-29-2022

Code answers related to "find the highest id in model django"

Python Answers by Framework

Browse Popular Code Answers by Language