cycle(items, *args): generator that returns (index, item, looped_value)
like this:
<tr py:for="index, product, css_class in std.cycle(products, 'row_0',
'row_1')" py:attrs="class=css_class">
<td>...</td>
</tr>
produces:
<tr class="row_0">
<tr class="row_1">
<tr class="row_0">
etc.
errors: cherrypy.request.form_errors, or empty dict
inputs: cherrypy.request.form_inputs, or empty dict
require(permissions): returns True if current identity has
permission(s) e.g.
<a py:if="std.require('edit_news')" href="edit">Edit news item</a>
if_error(name, if_error_str, if_not_error_str=None): if
cherrypt.request.form_errors has "name" then return the error string,
if not return second string. Error string may be formatted with
%(error)s:
<label py:attrs="class=std.if_error('title', 'error')">Title
${std.if_error('title', ': %(error)s')}</label>
On an error this may produce:
<label class="error">Title : please enter a value</label>
Kevin
> What is turbogears????
This question is puzzling in so many ways... this group has 750 members
and a lot of traffic... hard to imagine being in this group and not
knowing. Then, of course, there's Google:
http://www.google.com/search?q=turbogears
and, finally,
Kevin