Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(1)  |  Call(0)  |  Derive(0)  |  Import(1)
Return url for a Gravatar. From Zinnia blog. 

        @register.simple_tag
def get_gravatar(email, size=60, rating='g', default=None):
    """ Return url for a Gravatar. From Zinnia blog. """
    url = 'https://secure.gravatar.com/avatar/{0}.jpg'.format(
        md5(email.strip().lower()).hexdigest()
    )
    options = {'s': size, 'r': rating}
    if default:
        options['d'] = default

    url = '%s?%s' % (url, urlencode(options))
    return url.replace('&', '&')
        


src/d/j/django-knowledge-HEAD/tests/mock/tests/templatetags.py   django-knowledge(Download)
from django.test.client import RequestFactory
 
from mock.tests.base import TestCase
 
from knowledge.templatetags.knowledge_tags import get_gravatar, page_query