Zope ZPT Loop through database record / result field names

<tal:x define="personRS python: context.person_select(id = request.get('id'));
	       person   python: personRS[0];>
	<tal:loop repeat="key python: personRS.names()">
		<dt tal:content="python: key.replace('_', ' ')" />
		<dd><tal:x content="python: person[key]" /> </dd>
Posted by
Snippet Viewed 1495 times.

Share your Zope ZPT code snippets:

  • Get some recognition & a link back to your site.
  • Create your own code library.
  • Help your fellow developers, as they have helped you.


Submit | Browse

Most Recent zope zpt snippets

Most Viewed