Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

find the highest id in model django

latest_id = Model.objects.all().values_list('id', flat=True).order_by('-id').first()
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #find #highest #id #model #django
ADD COMMENT
Topic
Name
4+2 =