diff options
| author | Tom Christie | 2013-02-12 08:57:23 +0000 |
|---|---|---|
| committer | Tom Christie | 2013-02-12 08:58:28 +0000 |
| commit | 55fdac4176ac6629481a8cca8dd2463da9c594a2 (patch) | |
| tree | 0b144a0ec8de1b2540450b66d36fd73c76aaa619 /docs/tutorial/2-requests-and-responses.md | |
| parent | f5a0275547ad264c8a9b9aa2a45cc461723a4f11 (diff) | |
| download | django-rest-framework-55fdac4176ac6629481a8cca8dd2463da9c594a2.tar.bz2 | |
Use `many=True` for serializers.
Diffstat (limited to 'docs/tutorial/2-requests-and-responses.md')
| -rw-r--r-- | docs/tutorial/2-requests-and-responses.md | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/docs/tutorial/2-requests-and-responses.md b/docs/tutorial/2-requests-and-responses.md index 340ea28e..566c0dc6 100644 --- a/docs/tutorial/2-requests-and-responses.md +++ b/docs/tutorial/2-requests-and-responses.md @@ -51,7 +51,7 @@ We don't need our `JSONResponse` class anymore, so go ahead and delete that. On """ if request.method == 'GET': snippets = Snippet.objects.all() - serializer = SnippetSerializer(snippets) + serializer = SnippetSerializer(snippets, many=True) return Response(serializer.data) elif request.method == 'POST': |
