Hi list

I have to handle a lot of forms in my web app, and perhaps I need to edit them in the future, or add new forms, delete ones, whatever. The first approach I came up with was to create several tableforms with their fields, and then store them in the DB as Pickle objects, and fetch and return them to the template when necessary. This wasn't possible because the tableForm object isn't "pickable" (sorry for the new verb ;)), when pickling it, python complained saying that it could not do it because the tableForm has some threads, or thread handling, or something like that.

The approach i'm using now is to store in the DB a list of tuples like (string, dictionary), where the string is used to get the type of the field, and a dict (pickled) to hold the params for the formfield. This is a bit (fortunately, just a tiny bit) slow.

So the questions now are:
- is a single FormField pickable? (altough I think not) if so, how?
- are there any other approaches as flexible? I thought about storing html templates, but I didn't figured out how to put them within my templates, nor how to change the template I'm using for a particular controller in run time (at least not without screwing up multiple access to the same controller)

thanks for your help

Javier Rojas

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "TurboGears" 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/turbogears
-~----------~----~----~----~------~----~------~--~---

Reply via email to