From 7cbddc96a85410c14583b598312e40efe6051a44 Mon Sep 17 00:00:00 2001 From: Elrond Date: Mon, 14 Nov 2011 14:21:06 +0100 Subject: [PATCH] Enable mongokit's "Dot notation" mongokit documents can allow to use x.FIELD instead of x["FIELD"]. First it looks a lot more pythonic. Second it might allow us an easier migration path towards an sqlalchemy database backend. Docs: http://namlook.github.com/mongokit/tutorial.html#dot-notation --- mediagoblin/db/models.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mediagoblin/db/models.py b/mediagoblin/db/models.py index c010cb89..65c15917 100644 --- a/mediagoblin/db/models.py +++ b/mediagoblin/db/models.py @@ -63,6 +63,7 @@ class User(Document): - bio_html: biography of the user converted to proper HTML. """ __collection__ = 'users' + use_dot_notation = True structure = { 'username': unicode, @@ -177,6 +178,7 @@ class MediaEntry(Document): - fail_metadata: """ __collection__ = 'media_entries' + use_dot_notation = True structure = { 'uploader': ObjectId, @@ -321,6 +323,7 @@ class MediaComment(Document): """ __collection__ = 'media_comments' + use_dot_notation = True structure = { 'media_entry': ObjectId, -- 2.25.1