[Twisted-web] formless problem

James Y Knight foom at fuhm.net
Fri Jan 7 11:11:32 MST 2005

On Jan 7, 2005, at 12:15 PM, Tazzo wrote:
> I know, but my real intention is to build the form
> as a fragment of several pages.
> I mean, I want to build a form as in formbuilder example
> or similar, but render it in many pages like:
> def render_myForm(self,ctx,data):
>     return FormBuilder()
> as a piece of different pages but with the same behavior,
> depending (the behavior) only from the url request.
> So if I build a form that add a named 'box' in my page column,
> the form is the same for all my pages.

Store it in a module-level variable, or really anywhere else that is 
going to stick around, then.

myForm = FormBuilder()

class XYZ:
     def render_myForm(self,ctx,data):
         return myForm


More information about the Twisted-web mailing list