diff options
Diffstat (limited to 'docs/tutorial/1-serialization.md')
| -rw-r--r-- | docs/tutorial/1-serialization.md | 4 | 
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() | 
