diff options
author | Christopher Allan Webber <cwebber@dustycloud.org> | 2011-04-23 10:51:55 -0500 |
---|---|---|
committer | Christopher Allan Webber <cwebber@dustycloud.org> | 2011-04-23 10:51:55 -0500 |
commit | 74ae6b112a645bff68956dd2bf090507c0c230a9 (patch) | |
tree | 56db61f13d1057ced3d87be8ba6ccf6482b73f00 /mediagoblin/models.py | |
parent | 7bf3f5db0fe720bfb5cb9d85dfb01cdeae13af9d (diff) | |
download | mediagoblin-74ae6b112a645bff68956dd2bf090507c0c230a9.tar.lz mediagoblin-74ae6b112a645bff68956dd2bf090507c0c230a9.tar.xz mediagoblin-74ae6b112a645bff68956dd2bf090507c0c230a9.zip |
making state for MediaEntry objects, also adding attributes:
- media_files
- attachment_files
- queue_files
- thumbnail_file
Diffstat (limited to 'mediagoblin/models.py')
-rw-r--r-- | mediagoblin/models.py | 20 |
1 files 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 |