

@register.filter()
def gravatar(email, size=64):
    '\n    Return the Gravatar URL for the provided email.\n\n    :param email: the email address to hash\n    :param size: the size of the Gravatar to generate\n    :returns: the URL of the image\n    '
    return ('//gravatar.com/avatar/%s?d=identicon&size=%s' % (md5(smart_bytes(email)).hexdigest(), size))

dataset/ETHPy150Open 2buntu/2buntu-blog/twobuntu/accounts/templatetags/gravatar.py gravatar/original