Example #1
0
 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
Example #2
0
 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
Example #3
0
def list_all_widgets():
    return json.dumps(
        {_app: helpers.list_widgets(_app)
         for _app in helpers.list_apps()})
Example #4
0
 def __func():
     return {
         _app: helpers.list_widgets(_app)
         for _app in helpers.list_apps()
     }