Skip to content
This repository has been archived by the owner on Jul 17, 2018. It is now read-only.

Commit

Permalink
Merge pull request #28 from strakh/master
Browse files Browse the repository at this point in the history
new function to help vote options generation in templates
  • Loading branch information
dcramer committed Oct 19, 2011
2 parents d0ae149 + 355cc7f commit 8aa77ea
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions djangoratings/fields.py
Expand Up @@ -118,6 +118,9 @@ def get_rating_for_user(self, user, ip_address=None, cookies={}):
except Vote.DoesNotExist:
pass
return

def get_iterable_range(self):
return range(1, self.field.range) #started from 1, because 0 is equal to delete

def add(self, score, user, ip_address, cookies={}, commit=True):
"""add(score, user, ip_address)
Expand Down

0 comments on commit 8aa77ea

Please sign in to comment.