@register.filter
def image_urls(text):
 return map((lambda x: x[0]), IMAGE_URL_RE.findall(text))

@ register . filter def image_urls ( text ) : return map ( ( lambda x : x [ 0 ] ) , IMAGE_URL_RE . findall ( text ) )
return a list of image urls extracted from text .