from django import template register = template.Library() @register.filter def qr(value,size="150x150"): """ Usage: """ return "http://chart.apis.google.com/chart?chs=%s&cht=qr&chl=%s&choe=UTF-8&chld=H|0" % (size, value)