From 74ae6b112a645bff68956dd2bf090507c0c230a9 Mon Sep 17 00:00:00 2001 From: Christopher Allan Webber Date: Sat, 23 Apr 2011 10:51:55 -0500 Subject: [PATCH] making state for MediaEntry objects, also adding attributes: - media_files - attachment_files - queue_files - thumbnail_file --- mediagoblin/models.py | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/mediagoblin/models.py b/mediagoblin/models.py index f3d380cf..9e0ee8ca 100644 --- a/mediagoblin/models.py +++ b/mediagoblin/models.py @@ -70,16 +70,24 @@ class MediaEntry(Document): 'media_type': unicode, 'media_data': dict, # extra data relevant to this media_type 'plugin_data': dict, # plugins can dump stuff here. - 'file_store': unicode, - 'attachments': [dict], - 'tags': [unicode]} + 'tags': [unicode], + 'state': unicode, + + # The following should be lists of lists, in appropriate file + # record form + 'media_files': list, + 'attachment_files': list, + 'queue_files': list, + + # This one should just be a single file record + 'thumbnail_file': [unicode]} required_fields = [ - 'title', 'created', - 'media_type', 'file_store'] + 'uploader', 'title', 'created', 'media_type'] default_values = { - 'created': datetime.datetime.utcnow} + 'created': datetime.datetime.utcnow, + 'state': u'unprocessed'} def main_mediafile(self): pass -- 2.25.1