DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
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
COMMENT
Name
4+2 =
Submit