> Thank you! I guess as a general rule it's a good idea to handle the bulk of
> the heavylifting in the main code and then just have template render it eh?
> Jim

I think so. So you can define a new form class extending web.form.From
and add an additional method, e.g.

class PhotoForm (web.form.Form):

  def render_with_id(photo_id):
    self.id.set_value(photo_id)
    return self.render()

and within your template call this method:

$for photo in photoarray:
  <form method="POST">
  $:form.render_with_id(photo.id)
  </form>

I am not test this code but idea is clear I think.

Thanks,
Sergei.

-- 
You received this message because you are subscribed to the Google Groups 
"web.py" 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/webpy?hl=en.

Reply via email to