diff options
author | Christopher Allan Webber <cwebber@dustycloud.org> | 2013-06-22 16:13:41 -0500 |
---|---|---|
committer | Christopher Allan Webber <cwebber@dustycloud.org> | 2013-06-22 16:13:41 -0500 |
commit | 257b8ab62a6a5e04d60575a9766e5ed3503a15ed (patch) | |
tree | 5d998fd1b955cb180ad1010c07ec35b1fd945b1b /mediagoblin/db/mixin.py | |
parent | 75ee3de301e7bea30c40fe26d857bb6cc7878f82 (diff) | |
parent | 0c7fa7556ced34444db82d2d2d3b51b4f5327586 (diff) | |
download | mediagoblin-257b8ab62a6a5e04d60575a9766e5ed3503a15ed.tar.lz mediagoblin-257b8ab62a6a5e04d60575a9766e5ed3503a15ed.tar.xz mediagoblin-257b8ab62a6a5e04d60575a9766e5ed3503a15ed.zip |
Merge remote-tracking branch 'refs/remotes/joar/notifications'
Conflicts:
mediagoblin/db/migrations.py
Diffstat (limited to 'mediagoblin/db/mixin.py')
-rw-r--r-- | mediagoblin/db/mixin.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/mediagoblin/db/mixin.py b/mediagoblin/db/mixin.py index 9f566e36..1b32d838 100644 --- a/mediagoblin/db/mixin.py +++ b/mediagoblin/db/mixin.py @@ -31,6 +31,8 @@ import uuid import re import datetime +from datetime import datetime + from werkzeug.utils import cached_property from mediagoblin import mg_globals @@ -288,6 +290,13 @@ class MediaCommentMixin(object): """ return cleaned_markdown_conversion(self.content) + def __repr__(self): + return '<{klass} #{id} {author} "{comment}">'.format( + klass=self.__class__.__name__, + id=self.id, + author=self.get_author, + comment=self.content) + class CollectionMixin(GenerateSlugMixin): def check_slug_used(self, slug): |