Answer the question
In order to leave comments, you need to log in
How to implement the selection of the value with the maximum id in the model (table) in Django?
Hello.
I ask you to suggest whether it is possible to elegantly for the table 'table1', the code of the selection from which is given below:
>>> table1.objects.all().values_list('id','value1')
[(5L, 152449L), (6L, 12L), (7L, 999L), (8L, 11777L)]
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question