@core_helper
def url_for_static(*args, **kw):
 if args:
  url = urlparse.urlparse(args[0])
  url_is_external = ((url.scheme != '') or (url.netloc != ''))
  if url_is_external:
   CkanUrlException = ckan.exceptions.CkanUrlException
   raise CkanUrlException('External URL passed to url_for_static()')
 return url_for_static_or_external(*args, **kw)

@ core_helper def url_for_static ( * args , ** kw ) : if args : url = urlparse . urlparse ( args [ 0 ] ) url_is_external = ( ( url . scheme != '' ) or ( url . netloc != '' ) ) if url_is_external : CkanUrlException = ckan . exceptions . CkanUrlException raise CkanUrlException ( 'External URL passed to url_for_static()' ) return url_for_static_or_external ( * args , ** kw )
returns the url for static content that doesnt get translated itll raise ckanurlexception if called with an external url this is a wrapper for :py:func:routes .