Skip to content

Instantly share code, notes, and snippets.

@andresdouglas
Created March 18, 2011 05:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andresdouglas/875662 to your computer and use it in GitHub Desktop.
Save andresdouglas/875662 to your computer and use it in GitHub Desktop.
mongokit is returning dictionaries instead of Document instances
(Pdb) p base_object_list
<mongokit.cursor.Cursor object at 0x101fc0dd0>
(Pdb) p base_object_list[0]
{u'rating': 7, u'_id': ObjectId('4d82eed3051df234ba000000'), u'name': u'andres'}
(Pdb) p type(base_object_list[0])
<type 'dict'>
(Pdb) p self
<bakodo.user_app.api.resources.MongokitTestResource object at 0x102314cd0>
(Pdb) p self._meta.object_class
<class 'user_app.mongokit_models.MongokitTestModel'>
(Pdb) p self._meta.object_class.use_dot_notation
True
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment