[ Samir Mishra]
I have a SQL table with a large number of variables. I have a data entry form that uses the following logic about 30 times on a page - ---------------------------- [snipped] ---------------------------
What I'd like to be able to do is create a Python script that returns the above, AND I need the DTML document to recognise it as part of the code.
You should not be using Python to write markup. You should have Python compute and return parameters to a DTML method which would then constrcut the form you want. This division of labor will work much better, and be easier to understand and maintain, than getting Python to write the markup directly (which certainly can be done, but is best not done). For example, the Python script could return a dictionary of values, which your DTML method would insert into your form template. Cheers, Tom P