From 934492ebd02dfc580fd0dbd9d8a57ca123adb46d Mon Sep 17 00:00:00 2001 From: Matt Bosworth Date: Tue, 2 Oct 2012 22:41:03 -0700 Subject: 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. --- docs/tutorial/1-serialization.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'docs/tutorial/1-serialization.md') diff --git a/docs/tutorial/1-serialization.md b/docs/tutorial/1-serialization.md index cd4b7558..5d830315 100644 --- a/docs/tutorial/1-serialization.md +++ b/docs/tutorial/1-serialization.md @@ -78,7 +78,7 @@ Don't forget to sync the database for the first time. ## Creating a Serializer class -We're going to create a simple Web API that we can use to edit these comment objects with. The first thing we need is a way of serializing and deserializing the objects into representations such as `json`. We do this by declaring serializers, that work very similarly to Django's forms. Create a file in the project named `serializers.py` and add the following. +We're going to create a simple Web API that we can use to edit these comment objects with. The first thing we need is a way of serializing and deserializing the objects into representations such as `json`. We do this by declaring serializers that work very similarly to Django's forms. Create a file in the project named `serializers.py` and add the following. from blog import models from rest_framework import serializers @@ -201,7 +201,7 @@ The root of our API is going to be a view that supports listing all the existing Note that because we want to be able to POST to this view from clients that won't have a CSRF token we need to mark the view as `csrf_exempt`. This isn't something that you'd normally want to do, and REST framework views actually use more sensible behavior than this, but it'll do for our purposes right now. -We'll also need a view which corrosponds to an individual comment, and can be used to retrieve, update or delete the comment. +We'll also need a view which corresponds to an individual comment, and can be used to retrieve, update or delete the comment. @csrf_exempt def comment_instance(request, pk): @@ -231,7 +231,7 @@ We'll also need a view which corrosponds to an individual comment, and can be us comment.delete() return HttpResponse(status=204) -Finally we need to wire these views up, in the `tutorial/urls.py` file. +Finally we need to wire these views up. Create the `blog/urls.py` file: from django.conf.urls import patterns, url -- cgit v1.2.3