aboutsummaryrefslogtreecommitdiffstats
path: root/docs/tutorial/3-class-based-views.md
diff options
context:
space:
mode:
authorMatt Bosworth2012-10-02 22:41:03 -0700
committerMatt Bosworth2012-10-02 22:41:03 -0700
commit934492ebd02dfc580fd0dbd9d8a57ca123adb46d (patch)
tree20c5529cf2c2b3061d35d44bb3d52c8646ded5f0 /docs/tutorial/3-class-based-views.md
parentb89125ef53a2f9e246afd5eda5c8f404a714da76 (diff)
downloaddjango-rest-framework-934492ebd02dfc580fd0dbd9d8a57ca123adb46d.tar.bz2
Fixed references to serializer.serialized and serializer.serialized_errors
in part 3 of the tutorial. Altered part 1 to use blogs/urls.py since it was specified at the beginning. Also caught some spelling errors while I was at it.
Diffstat (limited to 'docs/tutorial/3-class-based-views.md')
-rw-r--r--docs/tutorial/3-class-based-views.md8
1 files changed, 4 insertions, 4 deletions
diff --git a/docs/tutorial/3-class-based-views.md b/docs/tutorial/3-class-based-views.md
index 25d5773f..b2b6443c 100644
--- a/docs/tutorial/3-class-based-views.md
+++ b/docs/tutorial/3-class-based-views.md
@@ -28,10 +28,10 @@ We'll start by rewriting the root view as a class based view. All this involves
if serializer.is_valid():
comment = serializer.object
comment.save()
- return Response(serializer.serialized, status=status.HTTP_201_CREATED)
- return Response(serializer.serialized_errors, status=status.HTTP_400_BAD_REQUEST)
+ return Response(serializer.data, status=status.HTTP_201_CREATED)
+ return Response(serializer.errors, status=status.HTTP_400_BAD_REQUEST)
-So far, so good. It looks pretty similar to the previous case, but we've got better seperation between the different HTTP methods. We'll also need to update the instance view.
+So far, so good. It looks pretty similar to the previous case, but we've got better separation between the different HTTP methods. We'll also need to update the instance view.
class CommentInstance(APIView):
"""
@@ -145,7 +145,7 @@ Using the mixin classes we've rewritten the views to use slightly less code than
model = Comment
serializer_class = CommentSerializer
-Wow, that's pretty concise. We've got a huge amount for free, and our code looks like good, clean, idomatic Django.
+Wow, that's pretty concise. We've got a huge amount for free, and our code looks like good, clean, idiomatic Django.
Next we'll move onto [part 4 of the tutorial][tut-4], where we'll take a look at how we can customize the behavior of our views to support a range of authentication, permissions, throttling and other aspects.