@core_helper
def get_site_protocol_and_host():
 site_url = config.get('ckan.site_url', None)
 if (site_url is not None):
  parsed_url = urlparse.urlparse(site_url)
  return (parsed_url.scheme.encode('utf-8'), parsed_url.netloc.encode('utf-8'))
 return (None, None)

@ core_helper def get_site_protocol_and_host ( ) : site_url = config . get ( 'ckan.site_url' , None ) if ( site_url is not None ) : parsed_url = urlparse . urlparse ( site_url ) return ( parsed_url . scheme . encode ( 'utf-8' ) , parsed_url . netloc . encode ( 'utf-8' ) ) return ( None , None )
return the protocol and host of the configured ckan .