Mercurial > agora
changeset 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 |
parents | 499e5f47f278 |
children | 2619e53b1ec2 |
files | apps/snippet/models.py |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/apps/snippet/models.py Fri Jul 19 22:09:29 2013 +0500 +++ b/apps/snippet/models.py Fri Jul 19 22:11:52 2013 +0500 @@ -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',)