Added json serialisation support

- Added to_json and from_json to Document (MongoEngine/mongoengine#1)
- Added to_json and from_json to QuerySet (MongoEngine/mongoengine#131)
This commit is contained in:
Ross Lawley
2012-11-08 12:04:14 +00:00
parent 4b45c0cd14
commit b8d53a6f0d
8 changed files with 201 additions and 20 deletions

View File

@@ -346,7 +346,7 @@ class InstanceTest(unittest.TestCase):
meta = {'shard_key': ('superphylum',)}
Animal.drop_collection()
doc = Animal(superphylum = 'Deuterostomia')
doc = Animal(superphylum='Deuterostomia')
doc.save()
doc.reload()
Animal.drop_collection()