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
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