Zope ZPT Display a query resultset dynamically

This basic markup will display any resultset with field names in the table head and corresponding data in the table body.
<table tal:define="results here/my_zsql_method">
	<th tal:repeat="name results/names" tal:content="name" />
<tr tal:repeat="row results">
	<td tal:repeat="name results/names" tal:content="python: row[name]" />
Posted by
Snippet Viewed 1489 times.

Share your Zope ZPT code snippets:

  • Get some recognition & link back to your site.


Submit | Browse

Most Recent zope zpt snippets

Most Viewed