@register.filter
def thumbnail_url(source, alias):
 try:
  thumb = get_thumbnailer(source)[alias]
 except Exception:
  return ''
 return thumb.url

@ register . filter def thumbnail_url ( source , alias ) : try : thumb = get_thumbnailer ( source ) [ alias ] except Exception : return '' return thumb . url
given a link .