At 03:50 PM 10/26/2001 +0200, F. GEIGER wrote: >How would you do? Would you clone ("reinvent") the Invoice class as - let's >say NonMkInvoice - for data acquisition and copy the data from it to Invoice >when it comes to save the Invoice to the db? Or is there a better >alternative?
Couldn't you save the invoice at each stage of the creation, with a flag like isComplete or isValid? Not only would it solve your problem, but someone could stop what they were doing and come back to it the next day. Another potential solution, which I don't like nearly as much as the one I just mentioned, is to grab the __dict__, remove the _mk_foo attrs and save that dictionary. But if your invoice has a list of LineItems or something, I don't know how well that will work. dict = invoice.__dict__ for key in dict.keys(): if key.startswith('_mk_'): del dict[key] print dict Similarly you can push the values along as hidden form fields which you read back in. -Chuck _______________________________________________ Webware-discuss mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/webware-discuss