[Answer]-How to access cookie and IP fields in DjangoRatings?

1👍

myinstance.rating contains method get_ratings() – which returns queryset to calculate all votes related to object. You can easily extend it for retrive necessary information. For example:

# it's lazy object
rating = myinstance.rating.get_ratings()

# do additional query for db
if not rating.filter(user=user, ip_address=request.META['REMOTE_ADDR']).exists():
    ...

Leave a comment