Wednesday, January 30, 2019

Get very last object of database

Hello guys, 

My issue is pretty simple. I want to get the very last record of my database (which is populated with thousands of entries)

So far ->very easy. But I want to make sure that the access to the database is as light as possible. Don't want django to parse everything in my database.

Kindly note that my DB has Primary key field.

I tried 


but both return the first filed instead of the last one.

Thanks for your help


You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To post to this group, send email to
Visit this group at
To view this discussion on the web visit
For more options, visit

No comments:

Post a Comment