Skip to content

Commit 21b5e1e

Browse files
committed
Fix example of explicit format URL (2.4.x).
Same as encode#2671, but for the 2.4.x docs.
1 parent 67ae6b2 commit 21b5e1e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/tutorial/2-requests-and-responses.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ Notice that we're no longer explicitly tying our requests or responses to a give
9696

9797
## Adding optional format suffixes to our URLs
9898

99-
To take advantage of the fact that our responses are no longer hardwired to a single content type let's add support for format suffixes to our API endpoints. Using format suffixes gives us URLs that explicitly refer to a given format, and means our API will be able to handle URLs such as [http://example.com/api/items/4.json][json-url].
99+
To take advantage of the fact that our responses are no longer hardwired to a single content type let's add support for format suffixes to our API endpoints. Using format suffixes gives us URLs that explicitly refer to a given format, and means our API will be able to handle URLs such as [http://example.com/api/items/4/.json][json-url].
100100

101101
Start by adding a `format` keyword argument to both of the views, like so.
102102

@@ -167,7 +167,7 @@ See the [browsable api][browsable-api] topic for more information about the brow
167167

168168
In [tutorial part 3][tut-3], we'll start using class based views, and see how generic views reduce the amount of code we need to write.
169169

170-
[json-url]: http://example.com/api/items/4.json
170+
[json-url]: http://example.com/api/items/4/.json
171171
[devserver]: http://127.0.0.1:8000/snippets/
172172
[browsable-api]: ../topics/browsable-api.md
173173
[tut-1]: 1-serialization.md

0 commit comments

Comments
 (0)