@register.filter
def has_rated(user, obj):
    return rating_score(obj, user) is not None
Returns whether or not the user has rated the given object
dataset/ETHPy150Open django-de/django-simple-ratings/ratings/templatetags/ratings_tags.py/has_rated