Comment out unecessary string replace
This commit is contained in:
parent
3926fb5a64
commit
3c268d40ae
@ -180,7 +180,7 @@ if __name__ == "__main__":
|
|||||||
#print()
|
#print()
|
||||||
#print(controller_perl)
|
#print(controller_perl)
|
||||||
# Map '$ 'to '$' to overcome problem with escaping $ signs
|
# 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:
|
with open('Targets/'+hl('PackageName')+'.pm', 'w') as file:
|
||||||
file.write(controller_perl)
|
file.write(controller_perl)
|
||||||
print("Targets/"+hl('PackageName')+'.pm controller generated ok')
|
print("Targets/"+hl('PackageName')+'.pm controller generated ok')
|
||||||
@ -195,7 +195,7 @@ if __name__ == "__main__":
|
|||||||
try:
|
try:
|
||||||
layout_mojo = layout_template.render(**json5_dict,conditions=routes)
|
layout_mojo = layout_template.render(**json5_dict,conditions=routes)
|
||||||
# Map '$ 'to '$' to overcome problem with escaping $ signs
|
# 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:
|
with open('Targets/'+hl('PackageName')+'.html.ep', 'w') as file:
|
||||||
file.write(layout_mojo)
|
file.write(layout_mojo)
|
||||||
print("Targets/"+hl('PackageName')+'.html.ep mojo template generated ok')
|
print("Targets/"+hl('PackageName')+'.html.ep mojo template generated ok')
|
||||||
@ -220,7 +220,7 @@ if __name__ == "__main__":
|
|||||||
try:
|
try:
|
||||||
partial_mojo_template = partial_template.render(**partial_mojo_context)
|
partial_mojo_template = partial_template.render(**partial_mojo_context)
|
||||||
# Map '$ 'to '$' to overcome problem with escaping $ signs
|
# 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:
|
with open('Targets/_'+hl('prefix')+"_"+html['route']+'.html.ep', 'w') as file:
|
||||||
file.write(partial_mojo_template)
|
file.write(partial_mojo_template)
|
||||||
print('Targets/_'+hl('prefix')+"_"+html['route']+'.html.ep mojo template generated ok')
|
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}")
|
print(f"An chameleon render on partial file control {inner_html['Name']} error occurred: {e}")
|
||||||
else:
|
else:
|
||||||
#just a simple entry - name less numerics is type
|
#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 = ''.join(char for char in html_control if not char.isdigit())
|
||||||
#html_Type = inner_html['Type']
|
|
||||||
#print(html_Type);
|
#print(html_Type);
|
||||||
try:
|
try:
|
||||||
simple_control_template = PageTemplate(html_controls[html_Type])
|
simple_control_template = PageTemplate(html_controls[html_Type])
|
||||||
try:
|
try:
|
||||||
simple_control_html = simple_control_template.render(value=inner_html,prefix=prefix_is)
|
simple_control_html = simple_control_template.render(value=inner_html,prefix=prefix_is)
|
||||||
# Map '$ 'to '$' to overcome problem with escaping $ signs
|
# 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
|
# 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
|
all_controls_html = all_controls_html + simple_control_html
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(f"An chameleon render on partial file control {inner_html['Name']} error occurred: {e}")
|
print(f"An chameleon render on partial file control {inner_html['Name']} error occurred: {e}")
|
||||||
|
Loading…
Reference in New Issue
Block a user