aboutsummaryrefslogtreecommitdiffstats
path: root/mediagoblin/models.py
diff options
context:
space:
mode:
authorChristopher Allan Webber <cwebber@dustycloud.org>2011-03-27 17:31:18 -0500
committerChristopher Allan Webber <cwebber@dustycloud.org>2011-03-27 17:31:18 -0500
commit6f86cfe95c9de40a1e0baaf2b19f3377a1db5f32 (patch)
tree31a41108a0fb0b7d486f7f2979b929911142922f /mediagoblin/models.py
parent65d7374c3752105c66ba8d55fa0943ad66c47b0e (diff)
downloadmediagoblin-6f86cfe95c9de40a1e0baaf2b19f3377a1db5f32.tar.lz
mediagoblin-6f86cfe95c9de40a1e0baaf2b19f3377a1db5f32.tar.xz
mediagoblin-6f86cfe95c9de40a1e0baaf2b19f3377a1db5f32.zip
__collection__ should be auto-defined as media_entries
Diffstat (limited to 'mediagoblin/models.py')
-rw-r--r--mediagoblin/models.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/mediagoblin/models.py b/mediagoblin/models.py
index 6ae7d6f9..41f4fb04 100644
--- a/mediagoblin/models.py
+++ b/mediagoblin/models.py
@@ -4,6 +4,8 @@ import datetime
class MediaEntry(Document):
+ __collection__ = 'media_entries'
+
structure = {
'title': unicode,
'created': datetime.datetime,
@@ -12,7 +14,8 @@ class MediaEntry(Document):
'media_data': dict, # extra data relevant to this media_type
'plugin_data': dict, # plugins can dump stuff here.
'file_store': unicode,
- 'tags': Set(unicode)}
+ 'attachments': [dict],
+ 'tags': [unicode]}
required_fields = [
'title', 'created',
@@ -20,7 +23,9 @@ class MediaEntry(Document):
default_values = {
'created': datetime.datetime.utcnow}
-
+
+ def main_mediafile(self):
+ pass
class User(Document):
structure = {