Skip to content

Instantly share code, notes, and snippets.

@Bpless
Created February 8, 2012 18:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save Bpless/1772125 to your computer and use it in GitHub Desktop.
Save Bpless/1772125 to your computer and use it in GitHub Desktop.
Compressed Document Result
from test.app import DecisionDocument, TrialDocument
subdoc = DecisionDocument(guilt='definitely', details={'bad_person_score': 'Very Bad Man'})
doc = TrialDocument(decision=[subdoc], reporter='Tom', jury='peers')
doc.save()
-----Object Created------
{
"_id" : ObjectId("4f32c2f4d0ba3a4b5e000000"),
"ju" : "peers",
"r" : "Tom",
"d" : [
{
"d" : {
"bad_person_score" : "Very Bad Man"
},
"g" : "definitely"
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment