@register.simple_tag
def gravatar_url(email, size=32):
 bits = (md5(email.lower().encode(u'utf-8')).hexdigest(), size)
 return (u'//www.gravatar.com/avatar/%s?s=%s&d=identicon&r=PG' % bits)

@ register . simple_tag def gravatar_url ( email , size = 32 ) : bits = ( md5 ( email . lower ( ) . encode ( u'utf-8' ) ) . hexdigest ( ) , size ) return ( u'//www.gravatar.com/avatar/%s?s=%s&d=identicon&r=PG' % bits )
return the gravatar image for the given email address .