1 2 3 4 5 6 7 8 9 10 11 12 | from django import template
from urlparse import urlparse, urlunparse
register = template.Library()
@register.simple_tag
def favicon(url):
parsed_url = urlparse(url)
return urlunparse((parsed_url[0], parsed_url[1],
u'favicon.ico', parsed_url[3],
parsed_url[4], parsed_url[5]))
|
More like this
- tag to store a settings value as template variable by pflanno 7 months, 1 week ago
- Sort Table Headers by insin 4 years, 7 months ago
- Digg-like pagination by SmileyChris 2 years, 8 months ago
- AddThis Social Networking TemplateTag by yeago 3 years, 1 month ago
- WithTag Tag by versae 3 years, 7 months ago
Comments