You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I was reading through the tutorial, I got to this section and read
```
The last missing part is passing the `posts` QuerySet to the template
context. Don't worry – we will cover how to display it in a later
chapter.
```
On a first read, this confused me -- I thought in both sentences we were
talking about the same action (passing `posts` into the `render` call
and displaying it in the template); making it additionally confusing
that we were doing _some_ work in this chapter about passing in posts.
I wondered whether the "next chapter" sentence was even necessary, and
found this in the commit logs:
8db3c91.
Noting that the ordering of the sentences had confused participants, and
they apparently wanted to hear that they were going to cover displaying
`posts` before an explanation of what `posts` was, I'm inferring that
they have an intuition that this is missing and want to hear what the
next steps are.
So I tried to break up that sentence into two clearly separate steps,
explaining what we'll do next and what we'll do later.
Copy file name to clipboardExpand all lines: en/dynamic_data_in_templates/README.md
+3-1Lines changed: 3 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -52,7 +52,9 @@ def post_list(request):
52
52
return render(request, 'blog/post_list.html', {})
53
53
```
54
54
55
-
The last missing part is passing the `posts` QuerySet to the template context. Don't worry – we will cover how to display it in a later chapter.
55
+
To display our QuerySet on our blog's post list, we have two things left to do:
56
+
1. Pass the `posts` QuerySet to the template context, by changing the `render` function call. We'll do this now.
57
+
2. Modify the template to display the `posts` QuerySet. We'll cover this in a later chapter.
56
58
57
59
Please note that we create a *variable* for our QuerySet: `posts`. Treat this as the name of our QuerySet. From now on we can refer to it by this name.
0 commit comments