easy enough to see this example, taken from the unit tests (whats the
proper way to run the unit tests individually, btw ?), function:
from toscawidgets.core import Widget
class MakoWidget(Widget):
params = ["rows"]
rows = []
engine_name = "mako"
template = """
<%page args="id=''" />
<table id="${id}">
% for row in rows:
${makerow(row)}
% endfor
</table>
<%def name="makerow(row)">
<tr>
% for name in row:
<td>${name}</td>
% endfor
</tr>
</%def>
"""
def update_params(self,d):
Widget.update_params(self,d)
if d['value']:
d['rows'] = d['value']
print MakoWidget().display([('foo','bar')]*5)
however, im using twForms and have a TableForm with a "template"
parameter that wants to use TemplateLookup to locate its template.
How to pass options along to the mako.ext.TGPlugin so that I can pass
the search directories along ?
bonus question, how to integrate those directories to be the same ones
used by my Pylons environment ?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TurboGears Trunk" 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/turbogears-trunk?hl=en
-~----------~----~----~----~------~----~------~--~---