def get_widgets(path=core.config.paths.apps_path): """Gets a dictionary of all Widgets for every App. Args: path (str, optional): The path to the apps. Defaults to the apps_path set in the configuration. Returns: A dictionary containing all App objects and any Widgets associated with them. """ ret = [] for app in Context.get_apps(): for widget in list_widgets(app, path): ret.append({'app': app, 'widget': widget}) return ret
def get_widgets(path=core.config.paths.apps_path): ret = [] for app in Context.get_apps(): for widget in list_widgets(app, path): ret.append({'app': app, 'widget': widget}) return ret
def list_all_widgets(): return json.dumps( {_app: helpers.list_widgets(_app) for _app in helpers.list_apps()})
def __func(): return { _app: helpers.list_widgets(_app) for _app in helpers.list_apps() }