From ccfbbd7f183538e96df76d82b2f4081fcc119b1f Mon Sep 17 00:00:00 2001 From: hrcerqueira Date: Sun, 7 Mar 2010 23:41:26 +0000 Subject: Lots of small fixes, including the missing comments problem. --- forum/models/base.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'forum/models/base.py') diff --git a/forum/models/base.py b/forum/models/base.py index 657f1e2f..2a8f3df9 100755 --- a/forum/models/base.py +++ b/forum/models/base.py @@ -19,6 +19,13 @@ import logging from forum.const import * +class UserContent(models.Model): + user = models.ForeignKey(User, related_name='%(class)ss') + + class Meta: + abstract = True + app_label = 'forum' + class MetaContent(models.Model): """ Base class for Vote, Comment and FlaggedItem @@ -26,7 +33,6 @@ class MetaContent(models.Model): content_type = models.ForeignKey(ContentType) object_id = models.PositiveIntegerField() content_object = generic.GenericForeignKey('content_type', 'object_id') - user = models.ForeignKey(User, related_name='%(class)ss') class Meta: abstract = True @@ -117,7 +123,7 @@ class Content(models.Model): except Exception: logging.debug('problem pinging google did you register you sitemap with google?') - def get_object_comments(self): + def get_comments(self): comments = self.comments.all().order_by('id') return comments -- cgit v1.2.3-1-g7c22