def bootstrap_find_resource(filename, cdn, use_minified=None, local=True):
 config = current_app.config
 if (None == use_minified):
  use_minified = config['BOOTSTRAP_USE_MINIFIED']
 if use_minified:
  filename = ('%s.min.%s' % tuple(filename.rsplit('.', 1)))
 cdns = current_app.extensions['bootstrap']['cdns']
 resource_url = cdns[cdn].get_resource_url(filename)
 if (resource_url.startswith('//') and config['BOOTSTRAP_CDN_FORCE_SSL']):
  resource_url = ('https:%s' % resource_url)
 return resource_url

def bootstrap_find_resource ( filename , cdn , use_minified = None , local = True ) : config = current_app . config if ( None == use_minified ) : use_minified = config [ 'BOOTSTRAP_USE_MINIFIED' ] if use_minified : filename = ( '%s.min.%s' % tuple ( filename . rsplit ( '.' , 1 ) ) ) cdns = current_app . extensions [ 'bootstrap' ] [ 'cdns' ] resource_url = cdns [ cdn ] . get_resource_url ( filename ) if ( resource_url . startswith ( '//' ) and config [ 'BOOTSTRAP_CDN_FORCE_SSL' ] ) : resource_url = ( 'https:%s' % resource_url ) return resource_url
resource finding function .