Mercurial > public > sg101
diff gpp/comments/models.py @ 140:91a01b8b5885
Comments: in order to show a green board concept while looking at the comments in the admin, added a 'not removed' boolean function.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Mon, 30 Nov 2009 03:20:24 +0000 |
parents | 48621ba5c385 |
children | 5c889b587416 |
line wrap: on
line diff
--- a/gpp/comments/models.py Sun Nov 29 22:33:15 2009 +0000 +++ b/gpp/comments/models.py Mon Nov 30 03:20:24 2009 +0000 @@ -67,6 +67,14 @@ args=(self.content_type_id, self.object_id) ) + def not_removed(self): + """ + Returns not self.is_removed. Used on the admin display for + "green board" display purposes. + """ + return not self.is_removed + not_removed.boolean = True + class CommentFlag(models.Model): """This model represents a user flagging a comment as inappropriate."""