Add in Mailsorting project and also corrections to templates

This commit is contained in:
2025-05-04 13:01:38 +01:00
parent 8b54f7f61c
commit 7b0f9edb91
20 changed files with 9154 additions and 12 deletions

6
sm2gen.py Executable file → Normal file
View File

@@ -676,6 +676,7 @@ if __name__ == "__main__":
except Exception as e:
logger.info(f"A Chameleon controller *template* error occurred: {e} {traceback.format_exc()}")
prefix_is = hl("prefix")
# Generate Custom controller file
try:
custom_controller_template = PageTemplateFile("Templates/custom.pm.tem")
@@ -689,7 +690,9 @@ if __name__ == "__main__":
panels=routes,
tablecontrols=tablecontrols.items(),
fields=fields,
dbfields=dbfields
dbfields=dbfields,
prefix=prefix_is
)
# We must be careful to not overwrite the custom file if the developer has already written to it - TBD
with open(custom_controller_file, "w") as file:
@@ -747,7 +750,6 @@ if __name__ == "__main__":
# Now generate the controls from the rest of the entries in the dict.
all_controls_html = ""
prefix_is = hl("prefix")
for html_control in html:
inner_html = html[html_control]
if isinstance(inner_html, dict):