durusmail: quixote-users: form2: troubles from a get
form2: troubles from a get
2004-02-24
2004-03-10
2004-03-10
2004-03-10
2004-03-10
form2: troubles from a get
Neil Schemenauer
2004-02-24
On Tue, Feb 24, 2004 at 06:56:41PM +0100, Daniele Varrazzo wrote:
> My app expects a request like
> http://localhost/esp/xpr/edit?id=247. In xpr.ptl, the edit method
> fetches  the record 247 from the database and use its data to
> populate the form. But then
>
>     if not form.is_submitted():
>         return render()
>
> this render is never executed because
> globals()['_publisher'].get_request().form == {'id': '247'}, so
> form.is_submitted() == 1 :-/

This is an annoying problem.  Unfortunately I don't think it can be
fixed without major changes to the "form2" design.  Widgets probably
need to be told by the form if they parse the request or use the
'value' that was passed to them.  Until this gets resolved, form2
should definitely be considered alpha and subject to incompatible
changes.

  Neil


reply