# HG changeset patch # User Ahsan Ali Shahid # Date 1374253912 -18000 # Node ID c5087ce140c9853655234356d5520de4b38742b5 # Parent 499e5f47f27886c03b8d820d6a83e6800a42befa 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 diff -r 499e5f47f278 -r c5087ce140c9 apps/snippet/models.py --- 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',)