def absolutify(url):
 site_url = getattr(settings, 'SITE_URL', False)
 if (not site_url):
  protocol = settings.PROTOCOL
  hostname = settings.DOMAIN
  port = settings.PORT
  if ((protocol, port) in (('https://', 443), ('http://', 80))):
   site_url = ''.join(map(str, (protocol, hostname)))
  else:
   site_url = ''.join(map(str, (protocol, hostname, ':', port)))
 return (site_url + url)

def absolutify ( url ) : site_url = getattr ( settings , 'SITE_URL' , False ) if ( not site_url ) : protocol = settings . PROTOCOL hostname = settings . DOMAIN port = settings . PORT if ( ( protocol , port ) in ( ( 'https://' , 443 ) , ( 'http://' , 80 ) ) ) : site_url = '' . join ( map ( str , ( protocol , hostname ) ) ) else : site_url = '' . join ( map ( str , ( protocol , hostname , ':' , port ) ) ) return ( site_url + url )
takes a url and prepends the site_url .