Mercurial > public > sg101
comparison gpp/comments/models.py @ 98:d0d779dd0832
Forums: flag posts.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Sun, 13 Sep 2009 21:45:35 +0000 |
parents | 7b6540b185d9 |
children | 9c18250972d5 |
comparison
equal
deleted
inserted
replaced
97:96eec1ed0fd3 | 98:d0d779dd0832 |
---|---|
73 user = models.ForeignKey(User) | 73 user = models.ForeignKey(User) |
74 comment = models.ForeignKey(Comment) | 74 comment = models.ForeignKey(Comment) |
75 flag_date = models.DateTimeField(auto_now_add=True) | 75 flag_date = models.DateTimeField(auto_now_add=True) |
76 | 76 |
77 def __unicode__(self): | 77 def __unicode__(self): |
78 return u'Comment ID %s flagged by %s' % (self.comment_id, self.user.username) | 78 return u'Comment ID %s flagged by %s' % (self.comment.id, self.user.username) |
79 | 79 |
80 class Meta: | 80 class Meta: |
81 ordering = ('flag_date', ) | 81 ordering = ('flag_date', ) |
82 | 82 |
83 def get_comment_url(self): | 83 def get_comment_url(self): |