mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-10 19:56:59 +03:00
Added .validated_data usage. Closes #2214.
This commit is contained in:
parent
99a43748eb
commit
b7b0fd3e14
|
@ -173,6 +173,8 @@ Deserialization is similar. First we parse a stream into Python native datatype
|
||||||
serializer = SnippetSerializer(data=data)
|
serializer = SnippetSerializer(data=data)
|
||||||
serializer.is_valid()
|
serializer.is_valid()
|
||||||
# True
|
# True
|
||||||
|
serializer.validated_data
|
||||||
|
# OrderedDict([('title', ''), ('code', 'print "hello, world"\n'), ('linenos', False), ('language', 'python'), ('style', 'friendly')])
|
||||||
serializer.save()
|
serializer.save()
|
||||||
# <Snippet: Snippet object>
|
# <Snippet: Snippet object>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user