I have a simple class:
class BlogPost(models.Model):
title = models.CharField(max_length=150)
...
timestamp = models.DateTimeField()
How can I get the last five items from the database?
I tried to do this:
posts = BlogPost.objects.<any code>
1 Answer