@register.filter
def has_been_completed_by(poll, user):
    user_votes = TopicPollVote.objects.filter(
        poll_option__poll=poll)
    if user.is_anonymous():
        forum_key = get_anonymous_user_forum_key(user)
        user_votes = user_votes.filter(anonymous_key=forum_key) if forum_key \
            else user_votes.none()
    else:
        user_votes = user_votes.filter(voter=user)
    return user_votes.exists()
This will return a boolean indicating if the passed user has already
dataset/ETHPy150Open ellmetha/django-machina/machina/templatetags/forum_polls_tags.py/has_been_completed_by