Skip to content

Commit fd84cf7

Browse files
Docs tweaks
1 parent 2e3032f commit fd84cf7

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

docs/topics/2.3-announcement.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ As an example of just how simple REST framework APIs can now be, here's an API w
3030

3131
# Routers provide an easy way of automatically determining the URL conf
3232
router = routers.DefaultRouter()
33-
router.register(r'users', views.UserViewSet)
34-
router.register(r'groups', views.GroupViewSet)
33+
router.register(r'users', UserViewSet)
34+
router.register(r'groups', GroupViewSet)
3535

3636

3737
# Wire up our API using automatic URL routing.

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Let's introduce a couple of essential building blocks.
88
REST framework introduces a `Request` object that extends the regular `HttpRequest`, and provides more flexible request parsing. The core functionality of the `Request` object is the `request.DATA` attribute, which is similar to `request.POST`, but more useful for working with Web APIs.
99

1010
request.POST # Only handles form data. Only works for 'POST' method.
11-
request.DATA # Handles arbitrary data. Works any HTTP request with content.
11+
request.DATA # Handles arbitrary data. Works for 'POST', 'PUT' and 'PATCH' methods.
1212

1313
## Response objects
1414

docs/tutorial/6-viewsets-and-routers.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ Registering the viewsets with the router is similar to providing a urlpattern.
119119

120120
The `DefaultRouter` class we're using also automatically creates the API root view for us, so we can now delete the `api_root` method from our `views` module.
121121

122-
## Trade-offs between views vs viewsets.
122+
## Trade-offs between views vs viewsets
123123

124124
Using viewsets can be a really useful abstraction. It helps ensure that URL conventions will be consistent across your API, minimizes the amount of code you need to write, and allows you to concentrate on the interactions and representations your API provides rather than the specifics of the URL conf.
125125

0 commit comments

Comments
 (0)