from PDAPI import * import TempLateAPI.GERP.API.FormAPI.FormData as FormData __metadata__ = { "route": "{DEFAULT_ROUTE}", "methods": ["GET"], "blueprint": "GERP", "permission": 1.0, "attributes": [], "limit": "1 per second" } def HandleRequest(_CleanedData): tables = [] user_models = FormData.get_user_models() for table_name in user_models.keys(): tables.append({ "name": table_name, "title": FormData.TABLE_DISPLAY_NAMES.get(table_name, table_name), "count": 0, "type": "dynamic", "source": "model" }) static_tables = list(FormData.data.keys()) for table_name in static_tables: if table_name not in user_models: tables.append({ "name": table_name, "title": FormData.TABLE_DISPLAY_NAMES.get(table_name, table_name), "count": 0, "type": "static", "source": "form" }) return {"code": 0, "tables": tables}, 200