aboutsummaryrefslogtreecommitdiffstats
path: root/docs/tutorial/1-serialization.md
diff options
context:
space:
mode:
authorTom Christie2012-09-17 20:19:45 +0100
committerTom Christie2012-09-17 20:19:45 +0100
commit308677037f1b1f2edbd2527beac8505033c98bdc (patch)
treeca71c4429058c769dd17283a4da75d9a01409fce /docs/tutorial/1-serialization.md
parent549ebdc1c67c20bdff39a2f4a59012dd010213a1 (diff)
downloaddjango-rest-framework-308677037f1b1f2edbd2527beac8505033c98bdc.tar.bz2
Tweak docs, fix .error_data -> .errors
Diffstat (limited to 'docs/tutorial/1-serialization.md')
-rw-r--r--docs/tutorial/1-serialization.md4
1 files changed, 2 insertions, 2 deletions
diff --git a/docs/tutorial/1-serialization.md b/docs/tutorial/1-serialization.md
index 610d8ed1..34990084 100644
--- a/docs/tutorial/1-serialization.md
+++ b/docs/tutorial/1-serialization.md
@@ -194,7 +194,7 @@ The root of our API is going to be a view that supports listing all the existing
comment.save()
return JSONResponse(serializer.data, status=201)
else:
- return JSONResponse(serializer.error_data, status=400)
+ return JSONResponse(serializer.errors, status=400)
We'll also need a view which corrosponds to an individual comment, and can be used to retrieve, update or delete the comment.
@@ -219,7 +219,7 @@ We'll also need a view which corrosponds to an individual comment, and can be us
comment.save()
return JSONResponse(serializer.data)
else:
- return JSONResponse(serializer.error_data, status=400)
+ return JSONResponse(serializer.errors, status=400)
elif request.method == 'DELETE':
comment.delete()