__collection__ should be auto-defined as media_entries
authorChristopher Allan Webber <cwebber@dustycloud.org>
Sun, 27 Mar 2011 22:31:18 +0000 (17:31 -0500)
committerChristopher Allan Webber <cwebber@dustycloud.org>
Sun, 27 Mar 2011 22:31:18 +0000 (17:31 -0500)
mediagoblin/models.py

index 6ae7d6f9a154590e4cbb1e8f151a6ac6428fe68b..41f4fb042f924ee159b7c336cf891eebc1e14613 100644 (file)
@@ -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 = {