Hi List, Asked this last night, but none to coherently. I'm working on a set-up which essentially makes a variety of multi-page data-entry processes generic. I've got a /completely/ generic page template which nicely renders any formulator form we chuck at it, and handles errors etc., and the sequence of formulator forms is defined in a script, which fires each form in turn, accumulating the data in the session object until the a script performs the database write(s). So far, so good. The last step (until we have another bright idea! <g>) is to make the /controlling/ script generic (the final database handling stuff being inherently /not/ generic). The idea is to get to a point where non-technical business-level folk can prototype a non-trivial, linear data-capture process by creating formulator objects and defining the sequence in which they run, and the only "techie" bit is writing the script to handle the data. We have the forms nicely managed, so we just need a "manageable" data structure to define the sequence, and carry any additional attributes which we might use in the generic process. After a bit of casting about, I think TinyTablePlus should be just the job. I have two questions: - - Given the outline of what we are doing, is there a better way of doing it? - Is there a syntax we can use in the Python script to directly access a column by it's index. e.g. if our table reads: - "1", "TestCase" "2", "NutCase" "3", "HeadCase" ...I'd like to be able to say something like: - container.REQUEST.SESSION.set ('formulator_object', getattr(container.process_spec('1'), form_name)) ...where '1' is the index of the current step and 'form_name' is the column name where the name of our formulator form lives. I've searched high and low for an example of this, but have found nothing helpful. I'd be really grateful if someone could help me out here, because my notes of how I've got this far should be a big help to the next poor sap with my skill set who thinks that all this stuff should be easier to puzzle out, documented, or just plain easier... -- Regards, PhilK Email: phil@xfr.co.uk / Voicemail & Facsimile: 07092 070518 "The lyf so short, the craft so long to learne" - Chaucer
participants (1)
-
Philip Kilner