A
A
Andrei1penguin12020-10-31 18:34:41
Django
Andrei1penguin1, 2020-10-31 18:34:41

How to access last row in sqlite table via django?

Good day, there was a need to access the last element from the sqlite database through django using User.objects.values()[-1].get(id), but negative indexing is not supported in this case, what should I do?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
sswwssww, 2020-10-31
@Andrei1penguin1

User.objects.last()

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question