Skip to content

Commit 601cbf1

Browse files
committed
Update 5-relationships-and-hyperlinked-apis.md
Following [@jpadilla](https://github.com/jpadilla)'s suggestion in issue [#2837](#2837), I am proposing a little addition in "Creating an endpoint for the root of our API" section in order to make it clear that the `user-list` and `snippet-list` names will be declared later in `snippets/urls.py`. Missing this clarification might lead a beginner (like me) to think that the names are somehow assigned by rest_framework under the hood and to try the code too early, getting stuck in the following errors.
1 parent ecb37f5 commit 601cbf1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/tutorial/5-relationships-and-hyperlinked-apis.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Right now we have endpoints for 'snippets' and 'users', but we don't have a sing
1818
'snippets': reverse('snippet-list', request=request, format=format)
1919
})
2020

21-
Notice that we're using REST framework's `reverse` function in order to return fully-qualified URLs.
21+
Two things should be noticed here. First, we're using REST framework's `reverse` function in order to return fully-qualified URLs; second, URL patterns are identified by convenience names that we will declare later on in our `snippets/urls.py`.
2222

2323
## Creating an endpoint for the highlighted snippets
2424

0 commit comments

Comments
 (0)