Take a look at this shell session:

>>> from blogs.models import Blog, BlogPost
>>> blog = Blog.objects.get(id=1)
>>> blog
<Blog: My Python Blog>
>>> posts = blog.blogpost_set.all()
>>> posts
<QuerySet [<BlogPost: Python is great>,
<BlogPost: Python is super>]>

This is a fresh Django shell session. We first import the two models we want to work with, and then query for the blog with an id of 1. In my sample project, that’s My Python Blog.