@core_helper
def url_for_static_or_external(*args, **kw):
 def fix_arg(arg):
  url = urlparse.urlparse(str(arg))
  url_is_relative = ((url.scheme == '') and (url.netloc == '') and (not url.path.startswith('/')))
  if url_is_relative:
   return ('/' + url.geturl())
  return url.geturl()
 if args:
  args = ((fix_arg(args[0]),) + args[1:])
 if kw.get('qualified', False):
  (kw['protocol'], kw['host']) = get_site_protocol_and_host()
 my_url = _routes_default_url_for(*args, **kw)
 return _local_url(my_url, locale='default', **kw)

@ core_helper def url_for_static_or_external ( * args , ** kw ) : def fix_arg ( arg ) : url = urlparse . urlparse ( str ( arg ) ) url_is_relative = ( ( url . scheme == '' ) and ( url . netloc == '' ) and ( not url . path . startswith ( '/' ) ) ) if url_is_relative : return ( '/' + url . geturl ( ) ) return url . geturl ( ) if args : args = ( ( fix_arg ( args [ 0 ] ) , ) + args [ 1 : ] ) if kw . get ( 'qualified' , False ) : ( kw [ 'protocol' ] , kw [ 'host' ] ) = get_site_protocol_and_host ( ) my_url = _routes_default_url_for ( * args , ** kw ) return _local_url ( my_url , locale = 'default' , ** kw )
returns the url for static content that doesnt get translated .