diff options
Diffstat (limited to 'website/models.py')
-rw-r--r-- | website/models.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/website/models.py b/website/models.py index b15f1cd..b195f3f 100644 --- a/website/models.py +++ b/website/models.py @@ -31,8 +31,12 @@ class Question(models.Model): userUpVotes = models.ManyToManyField(User, blank=True, related_name='postUpVotes') userDownVotes = models.ManyToManyField(User, blank=True, related_name='postDownVotes') num_votes = models.IntegerField(default=0) + + def __unicode__(self): return '%s' % (self.user) + + class Meta: get_latest_by = "date_created" |