diff options
author | Jef van Schendel <mail@jefvanschendel.nl> | 2012-02-21 17:43:05 +0100 |
---|---|---|
committer | Jef van Schendel <mail@jefvanschendel.nl> | 2012-02-21 17:43:05 +0100 |
commit | aa8804719c7930181aa7a0af41ca5b983fdf5be4 (patch) | |
tree | ba3f8a30d3b72e6b29bdd71823df2c33d4bb2b27 /mediagoblin/db/mongo/models.py | |
parent | 6c2e57304c302acfc005686515ce91d91727dd8d (diff) | |
parent | 99812bbc4a76735824708b341ea283f09a1b423c (diff) | |
download | mediagoblin-aa8804719c7930181aa7a0af41ca5b983fdf5be4.tar.lz mediagoblin-aa8804719c7930181aa7a0af41ca5b983fdf5be4.tar.xz mediagoblin-aa8804719c7930181aa7a0af41ca5b983fdf5be4.zip |
Resolve merge conflicts
Diffstat (limited to 'mediagoblin/db/mongo/models.py')
-rw-r--r-- | mediagoblin/db/mongo/models.py | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/mediagoblin/db/mongo/models.py b/mediagoblin/db/mongo/models.py index 541086bc..57af137d 100644 --- a/mediagoblin/db/mongo/models.py +++ b/mediagoblin/db/mongo/models.py @@ -23,7 +23,7 @@ from mediagoblin.db.mongo import migrations from mediagoblin.db.mongo.util import ASCENDING, DESCENDING, ObjectId from mediagoblin.tools.pagination import Pagination from mediagoblin.tools import url -from mediagoblin.db.mixin import UserMixin, MediaEntryMixin +from mediagoblin.db.mixin import UserMixin, MediaEntryMixin, MediaCommentMixin ################### # Custom validators @@ -59,7 +59,6 @@ class User(Document, UserMixin): - is_admin: Whether or not this user is an administrator or not. - url: this user's personal webpage/website, if appropriate. - bio: biography of this user (plaintext, in markdown) - - bio_html: biography of the user converted to proper HTML. """ __collection__ = 'users' use_dot_notation = True @@ -76,7 +75,6 @@ class User(Document, UserMixin): 'is_admin': bool, 'url': unicode, 'bio': unicode, # May contain markdown - 'bio_html': unicode, # May contain plaintext, or HTML 'fp_verification_key': unicode, # forgotten password verification key 'fp_token_expire': datetime.datetime, } @@ -112,9 +110,6 @@ class MediaEntry(Document, MediaEntryMixin): up with MarkDown for slight fanciness (links, boldness, italics, paragraphs...) - - description_html: Rendered version of the description, run through - Markdown and cleaned with our cleaning tool. - - media_type: What type of media is this? Currently we only support 'image' ;) @@ -179,7 +174,6 @@ class MediaEntry(Document, MediaEntryMixin): 'slug': unicode, 'created': datetime.datetime, 'description': unicode, # May contain markdown/up - 'description_html': unicode, # May contain plaintext, or HTML 'media_type': unicode, 'media_data': dict, # extra data relevant to this media_type 'plugin_data': dict, # plugins can dump stuff here. @@ -257,7 +251,7 @@ class MediaEntry(Document, MediaEntryMixin): return self.db.User.find_one({'_id': self.uploader}) -class MediaComment(Document): +class MediaComment(Document, MediaCommentMixin): """ A comment on a MediaEntry. @@ -266,8 +260,6 @@ class MediaComment(Document): - author: user who posted this comment - created: when the comment was created - content: plaintext (but markdown'able) version of the comment's content. - - content_html: the actual html-rendered version of the comment displayed. - Run through Markdown and the HTML cleaner. """ __collection__ = 'media_comments' @@ -278,7 +270,7 @@ class MediaComment(Document): 'author': ObjectId, 'created': datetime.datetime, 'content': unicode, - 'content_html': unicode} + } required_fields = [ 'media_entry', 'author', 'created', 'content'] |