This would be a solution:
At gluon/templates.py line 790, poll for "*response.parseview*" which is a
custom function that will get the template text and return a modified one:
....
else:
text = filename.read()
response = context.get("response")
if response and response.parseview:
text = response.parseview(text)
text = to_native(text)
# Use the file contents to get a parsed template and return it.
return str(TemplateParser(text, context=context, path=path, lexers=
lexers, delimiters=delimiters)
Create the custom function returning text:
def js_template_fix(text):
return text.replace(r"\{{", "")
And at a controller:
def mycont():
response.parseview = fix_js_templates
return locals()
Not sure if it will work when the views are compiled, but for now this is
good enough.
Thanks again.
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.