@register.filter
def followers(username):
    try:
        user = User.objects.get(username=username)
    except User.DoesNotExist:
        raise template.TemplateSyntaxError("%r is not a valid username" % username)
    return len(Follow.objects.followers(user))
dataset/ETHPy150Open python/raspberryio/raspberryio/userprofile/templatetags/relationship_tags.py/followers/original