Given a queryset for one model, I want to get a queryset of another model that is related by foreign key. Take the Django project docs\' weblog schema:
The trick for this is to remember that if you want a queryset of Blogs, you should start with the Blog model. Then, you can use the double-underscore syntax to follow relations. So: