I can't upload the patch file to the group but I can describe what it
does.

The patch allows python code to be re-used with a simple copy/paste
operation, which can otherwise get very frustrating when you have to
split it up to insert the double braces and "pass" at appropriate
locations to make it work in a view.

RULES: the code has to start with {{!  and end with }} as the first
chars in a separate line,
the = is replaced by response.write only if it is the first non-blank
char in a line,
the original indentation is kept.

Example:
...
<td>{{!v=inp[f]
if hasattr(v,'xml'):
  =v.xml()
else:
  =v
a='test'
=a
}}</td>
</tr>
...

would end up as:
...
    v=inp[f]
    if hasattr(v,'xml'):
      response.write(v.xml())
    else:
      response.write(v)
    a='test'
    response.write(a)
    response.write('</td>\n</tr>',escape=False)
...

There is an obvious cost of parsing two additional regex rules.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to