def require_app(app_name, api_style=False):
 iterable = (inspect.getmodule(frame[0]) for frame in inspect.stack())
 modules = [module for module in iterable if (module is not None)]
 if api_style:
  m = modules[2]
 else:
  m = modules[1]
 m._REQUIRED_APP = getattr(m, '_REQUIRED_APP', [])
 m._REQUIRED_APP.append(app_name)
 LOG.debug('require_app: %s is required by %s', app_name, m.__name__)

def require_app ( app_name , api_style = False ) : iterable = ( inspect . getmodule ( frame [ 0 ] ) for frame in inspect . stack ( ) ) modules = [ module for module in iterable if ( module is not None ) ] if api_style : m = modules [ 2 ] else : m = modules [ 1 ] m . _REQUIRED_APP = getattr ( m , '_REQUIRED_APP' , [ ] ) m . _REQUIRED_APP . append ( app_name ) LOG . debug ( 'require_app: %s is required by %s' , app_name , m . __name__ )
request the application to be automatically loaded .