Comment out unecessary string replace

This commit is contained in:
Brian Read 2024-04-09 12:54:01 +01:00
parent 3926fb5a64
commit 3c268d40ae

View File

@ -180,7 +180,7 @@ if __name__ == "__main__":
#print()
#print(controller_perl)
# Map '$ 'to '$' to overcome problem with escaping $ signs
controller_perl = controller_perl.replace("$ ", "$")
#controller_perl = controller_perl.replace("$ ", "$")
with open('Targets/'+hl('PackageName')+'.pm', 'w') as file:
file.write(controller_perl)
print("Targets/"+hl('PackageName')+'.pm controller generated ok')
@ -195,7 +195,7 @@ if __name__ == "__main__":
try:
layout_mojo = layout_template.render(**json5_dict,conditions=routes)
# Map '$ 'to '$' to overcome problem with escaping $ signs
layout_mojo = layout_mojo.replace("$ ", "$")
#layout_mojo = layout_mojo.replace("$ ", "$")
with open('Targets/'+hl('PackageName')+'.html.ep', 'w') as file:
file.write(layout_mojo)
print("Targets/"+hl('PackageName')+'.html.ep mojo template generated ok')
@ -220,7 +220,7 @@ if __name__ == "__main__":
try:
partial_mojo_template = partial_template.render(**partial_mojo_context)
# Map '$ 'to '$' to overcome problem with escaping $ signs
partial_mojo_template = partial_mojo_template.replace("$ ", "$")
#partial_mojo_template = partial_mojo_template.replace("$ ", "$")
with open('Targets/_'+hl('prefix')+"_"+html['route']+'.html.ep', 'w') as file:
file.write(partial_mojo_template)
print('Targets/_'+hl('prefix')+"_"+html['route']+'.html.ep mojo template generated ok')
@ -257,18 +257,16 @@ if __name__ == "__main__":
print(f"An chameleon render on partial file control {inner_html['Name']} error occurred: {e}")
else:
#just a simple entry - name less numerics is type
#print(html_control)
html_Type = ''.join(char for char in html_control if not char.isdigit())
#html_Type = inner_html['Type']
#print(html_Type);
try:
simple_control_template = PageTemplate(html_controls[html_Type])
try:
simple_control_html = simple_control_template.render(value=inner_html,prefix=prefix_is)
# Map '$ 'to '$' to overcome problem with escaping $ signs
simple_control_html = simple_control_html.replace("$ ", "$")
#simple_control_html = simple_control_html.replace("$ ", "$")
# Add in two tabs before each newline
simple_control_html = simple_control_html.replace("\n", "\n\t\t")
#simple_control_html = simple_control_html.replace("\n", "\n\t\t")
all_controls_html = all_controls_html + simple_control_html
except Exception as e:
print(f"An chameleon render on partial file control {inner_html['Name']} error occurred: {e}")