Skip to content

Commit

Permalink
Update README with example of loading list of objects
Browse files Browse the repository at this point in the history
  • Loading branch information
maximkulkin committed Aug 23, 2016
1 parent 7d0b9f3 commit cfbb0be
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,17 @@ Example
# publish_date=date(1997, 06, 27),
# author=User(name='J. K. Rowling'))
# Loading list of objects
List(BookType).load([
{'title': 'Harry Potter and the Philosopher\'s Stone',
'publish_date': '1997-06-26',
'author': {'name': 'J. K. Rowling'}},
{'title': 'Harry Potter and the Chamber of Secrets',
'publish_date': '1998-07-02',
'author': {'name': 'J. K. Rowling'}},
])
# => [Book(...), Book(...)]
# Validation
BookType.validate({
'title': 'Harry Potter and the Philosopher\'s Stone',
Expand Down

0 comments on commit cfbb0be

Please sign in to comment.