Mercurial > hg > agora
diff apps/snippet/models.py @ 203:c5087ce140c9
modified snippets model file to add rating field. This series of updates should be applied carefully and south should be used so that it can add additional fields into the database without resetting the database
author | Ahsan Ali Shahid <ahsan.ali.shahid@gmail.com> |
---|---|
date | Fri, 19 Jul 2013 22:11:52 +0500 (2013-07-19) |
parents | c7be7def8b57 |
children | c13a3ab314ab |
line wrap: on
line diff
--- a/apps/snippet/models.py +++ b/apps/snippet/models.py @@ -40,7 +40,8 @@ parent = TreeForeignKey('self', null=True, blank=True, related_name='children') num_views = models.IntegerField(default=0) - + rating = RatingField(range=5,can_change_vote=True,allow_anonymous=True,allow_delete=True) + class Meta: ordering = ('-published',)