示例#1
0
def get_gravatar_for_email(email, size = None, rating = None):
    """
    Generates a Gravatar URL for the given email address.

    Syntax::

        {% get_gravatar_for_email <email> [size] [rating] %}

    Example::

        {% get_gravatar_for_email [email protected] 48 r %}
    """
    return get_gravatar(email, size, rating)
示例#2
0
def get_gravatar_for_author(author, size=None, rating=None):
    email = mailfilter.findall(author)
    if len(email) is 0 or len(email) > 1:
        return None
    else:
        return get_gravatar(email[0], size, rating)
示例#3
0
def get_gravatar_for_author(author, size = None, rating = None):
    email = mailfilter.findall(author)
    if len(email) is 0 or len(email) > 1:
        return None
    else:
        return get_gravatar(email[0], size, rating)