diff options
author | Elrond <elrond+mediagoblin.org@samba-tng.org> | 2012-03-01 21:59:26 +0100 |
---|---|---|
committer | Elrond <elrond+mediagoblin.org@samba-tng.org> | 2012-03-01 22:25:41 +0100 |
commit | 5ff575827b5f53a6a5e8126cbcc5a66fde005786 (patch) | |
tree | 7a968da26d92b3f85abddfc008fa6d4a6d6105e5 /mediagoblin/db/mongo/models.py | |
parent | 94df840b3bf100a3fdd33e2fef2d4201d4a4ac45 (diff) | |
download | mediagoblin-5ff575827b5f53a6a5e8126cbcc5a66fde005786.tar.lz mediagoblin-5ff575827b5f53a6a5e8126cbcc5a66fde005786.tar.xz mediagoblin-5ff575827b5f53a6a5e8126cbcc5a66fde005786.zip |
Video media_data: Change layout in the mongo world
Change the media_data for video from
entry.media_data["video"] to use entry.media_data directly.
Also start a bare MediaEntry.media_data_init(**kwargs)
method for setting up the media_data and possibly
initialising it with kwargs.
Diffstat (limited to 'mediagoblin/db/mongo/models.py')
-rw-r--r-- | mediagoblin/db/mongo/models.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/mediagoblin/db/mongo/models.py b/mediagoblin/db/mongo/models.py index 99c7905d..c86adbb6 100644 --- a/mediagoblin/db/mongo/models.py +++ b/mediagoblin/db/mongo/models.py @@ -220,6 +220,9 @@ class MediaEntry(Document, MediaEntryMixin): id = MongoPK() + def media_data_init(self, **kwargs): + self.media_data.update(kwargs) + def get_comments(self, ascending=False): if ascending: order = ASCENDING |