Update 2-requests-and-responses.md

This commit is contained in:
Kenneth Schnall 2016-07-07 15:10:55 -04:00 committed by Ken Schnall
parent c1894ebe5e
commit 3a1147ccac

View File

@ -25,7 +25,7 @@ Using numeric HTTP status codes in your views doesn't always make for obvious re
REST framework provides two wrappers you can use to write API views. REST framework provides two wrappers you can use to write API views.
1. The `@api_view` decorator for working with function based views. 1. The `@api_view` decorator for working with function based views.
2. The `APIView` class for working with class based views. 2. The `APIView` class for working with class-based views.
These wrappers provide a few bits of functionality such as making sure you receive `Request` instances in your view, and adding context to `Response` objects so that content negotiation can be performed. These wrappers provide a few bits of functionality such as making sure you receive `Request` instances in your view, and adding context to `Response` objects so that content negotiation can be performed.
@ -200,7 +200,7 @@ See the [browsable api][browsable-api] topic for more information about the brow
## What's next? ## What's next?
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. 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.
[json-url]: http://example.com/api/items/4/.json [json-url]: http://example.com/api/items/4/.json
[devserver]: http://127.0.0.1:8000/snippets/ [devserver]: http://127.0.0.1:8000/snippets/