In controller xyz I create an object and pass it to the xyz.mako
template as c.foo.  When user submits the form created by that
template, the controller xyz_action handles the form results.  But I
want the object that was passed to the template as c.foo to be
available in xyz_action.  I want xyz_action to be able to look at some
information that was extracted from the database when the form was
created, which may of course be different from the state of things
when the form is submitted.

In other words I want to be able to pass some information from the xyz
controller instance to the <i>corresponding</i> xyz_action controller
instance, and also have that information available in xyz.mako in
between them.

It appears that c.foo is destroyed when the template returns.  It's
not available in xyz_action.

I tried something like "request.POST['foo']=c.foo" in python code in
the template, but the value stored there is lost when the form is
submitted.

I thought about using g.foo, but each instantiation of the form has
its own c.foo object, and there could be multiple instances of the
form simultaneously being viewed by users. And the user may navigate
away from the form page without hitting a submit button, in which case
the c.foo object is no longer valid.

Any suggestions?


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" 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/pylons-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to