mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-11 04:07:39 +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.is_valid()
|
||||
# True
|
||||
serializer.validated_data
|
||||
# OrderedDict([('title', ''), ('code', 'print "hello, world"\n'), ('linenos', False), ('language', 'python'), ('style', 'friendly')])
|
||||
serializer.save()
|
||||
# <Snippet: Snippet object>
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user