Exemple #1
0
 def load_ui_params(self,context={}):
     actions=action.actions_to_json()
     layouts=layout.layouts_to_json(mobile_only=context.get("mobile_only"))
     models=model.models_to_json()
     return {
         "actions": actions,
         "layouts": layouts,
         "models": models,
     }
Exemple #2
0
 def load_ui_params(self,context={}):
     actions=action.actions_to_json(modules=context.get("modules"))
     layouts=layout.layouts_to_json(modules=context.get("modules"),mobile_only=context.get("mobile_only"))
     models=model.models_to_json()
     return {
         "version_name": get_module_version_name(),
         "version_code": get_module_version_code(),
         "actions": actions,
         "layouts": layouts,
         "models": models,
     }
Exemple #3
0
def make_ui_params():
    print("building ui_params...")
    data = {}
    data["version"] = netforce.get_module_version_name()
    data["models"] = model.models_to_json()
    data["actions"] = action.actions_to_json()
    data["layouts"] = layout.layouts_to_json()
    data["templates"] = template.templates_to_json()
    if data:
        if not os.path.exists("static"):
            os.makedirs("static")
        print("  => static/ui_params.json")
        s = json.dumps(data, sort_keys=True, indent=4, separators=(',', ': '))
        open("static/ui_params.json", "w").write(s)
Exemple #4
0
def make_ui_params():
    print("building ui_params...")
    data = {}
    data["version"] = netforce.get_module_version_name()
    data["models"] = model.models_to_json()
    data["actions"] = action.actions_to_json()
    data["layouts"] = layout.layouts_to_json()
    data["templates"] = template.templates_to_json()
    if data:
        if not os.path.exists("static"):
            os.makedirs("static")
        print("  => static/ui_params.json")
        s = json.dumps(data, sort_keys=True, indent=4, separators=(',', ': '))
        open("static/ui_params.json", "w").write(s)
Exemple #5
0
 def load_ui_params(self, context={}):
     actions = action.actions_to_json(modules=context.get("modules"))
     layouts = layout.layouts_to_json(
         modules=context.get("modules"),
         mobile_only=context.get("mobile_only"))
     models = model.models_to_json()
     templates = template.templates_to_json(modules=context.get("modules"))
     return {
         "version_name": get_module_version_name(),
         "version_code": get_module_version_code(),
         "actions": actions,
         "layouts": layouts,
         "models": models,
         "templates": templates,
     }