Suppose I have these two models:
class Blog(models.Model):
name = models.CharField(max_length=64)
# ...
class Entry(models.Model):
blog = models.ForeignKey(Blog)
added = models.DateTimeField(auto_now_add=True)
# ...
Now I want to get a list of all blogs along with the latest blog entry for each respective blog. What's the best way to do it?
If it makes any difference, we can assume that each blog has at least one entry.