Skip to content

Commit b8e7322

Browse files
authored
Merge pull request DjangoGirls#1644 from shaib/clarify-pk-name
Clarify which name should be the same
2 parents 6b8a71d + d59cb98 commit b8e7322

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

en/extend_your_application/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,8 @@ Do you remember what the next step is? It's adding a view!
8181

8282
## Add a post's detail view
8383

84-
This time our *view* is given an extra parameter, `pk`. Our *view* needs to catch it, right? So we will define our function as `def post_detail(request, pk):`. Note that we need to use exactly the same name as the one we specified in `urls` (`pk`). Omitting this variable is incorrect and will result in an error!
84+
This time our *view* is given an extra parameter, `pk`. Our *view* needs to catch it, right? So we will define our function as `def post_detail(request, pk):`. Note that this parameter must have the exact same name as the one we specified in `urls` (`pk`). Also note that omitting this variable is incorrect and will result in an error!
85+
8586

8687
Now, we want to get one and only one blog post. To do this, we can use querysets, like this:
8788

0 commit comments

Comments
 (0)