summaryrefslogtreecommitdiffstats
path: root/forum/models/base.py
diff options
context:
space:
mode:
authorhrcerqueira <hrcerqueira@gmail.com>2010-03-07 23:41:26 +0000
committerhrcerqueira <hrcerqueira@gmail.com>2010-03-07 23:41:26 +0000
commitccfbbd7f183538e96df76d82b2f4081fcc119b1f (patch)
tree9eae31a6f8d4d3c5397d6d6ff457b6ec51dd32b5 /forum/models/base.py
parent0d1d1ef3a3416b5bcd4eb867356484b28f0c7f05 (diff)
downloadaskbot-ccfbbd7f183538e96df76d82b2f4081fcc119b1f.tar.gz
askbot-ccfbbd7f183538e96df76d82b2f4081fcc119b1f.tar.bz2
askbot-ccfbbd7f183538e96df76d82b2f4081fcc119b1f.zip
Lots of small fixes, including the missing comments problem.
Diffstat (limited to 'forum/models/base.py')
-rwxr-xr-xforum/models/base.py10
1 files changed, 8 insertions, 2 deletions
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