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