Karl Guertin wrote:
On 1/3/06, Jeremy Jones <[EMAIL PROTECTED]> wrote:
I'm not sure I explained this all that well, but if anyone understood
and has a suggestion, I'm all ears.
If I'm reading you right, you want formmaker from fastdata:
from turbogears.fastdata import formmaker
def some_form_to_display(sqlobjClass, widetList=[], **kw):
return dict(someForm=W.TableForm(widgets=formmaker(sqlobjClass,widgetList))
Ummm...this looks maybe along the lines of what I'm doing, but I'm not
pulling from a single SQLObject class instance. I'm pulling a product
ID from the initial GET data, retrieving the appropriate base project
instance from a SQLObject class, figuring out which child products also
need to be in the form in order to set quantities on them so I can later
create a CustomerOrder SQLObject class instance and OrderItem instances
associated with the CustomerOrder. Wow. What a run-on sentence.
Anyway, I don't need to modify a single SQLObject class instance - I
need to get a few pieces of data and then assemble a Form from there.
Can fastdata do that?
- jmj