I have two question. Would you help me please.
Hello. First of all Happy New Year! This is korea. I am a zope student. On studying I have two question. Q1. How call the ZSQLMethod into script python. Firrst I write the script python named 'myscript' and the ZSQLMethod named 'mySqlMethod' myscript (script python)************************************************************ # Example code: # Import a standard function, and get the HTML request and response objects. from Products.PythonScripts.standard import html_quote request = container.REQUEST RESPONSE = request.RESPONSE # Return a string identifying this script. val = context.mySqlMethod() print val return printed mySqlMethod (ZSQLMethod)************************************************************ select * from bbs1 (:bbs1 is the table name of the DB) How call the 'mySqlMethod'(ZSQLMethod) into 'myscript'(script python) and how display the query results of ZSQL Method called into script python ? I called mysqlMethod into the above myscript( val = context.mySqlMethod()). But I failed. Q2. How to display the list type data. myDTMLMethod(DTMLMethod)************************************************ ** <dtml-var standard_html_header> <dtml-var "myScript()"> <dtml-var standard_html_footer> myscript (script python)************************************************** # Example code: # Import a standard function, and get the HTML request and response objects. from Products.PythonScripts.standard import html_quote request = container.REQUEST RESPONSE = request.RESPONSE list1=[] vala = 100 valb = 200 list1.append(vala) list1.append(valb) return list1 I worte DTMLMethod named 'myDTMLMethod' and script python named 'myscript' Above myscript return the list type data. Then how display the returned list type data into the myDTMLMethod? The question part is <dtml-var "myScript()"> But I failed. How could I resolve thses questions? Help me!! Thank you very much.
Hi,
Q1. How call the ZSQLMethod into script python.
take a look at http://www.zope.org/Members/spinwing/ZSQL_Results
Q2. How to display the list type data.
You should give us more info, errors or trace back. -- Vincenzo Di Somma - Responsabile Ricerca e Sviluppo - Icube S.r.l. Sede: Via Ridolfi 15 - 56124 Pisa (PI), Italia E-mail: e.disomma@icube.it WWW: www.icube.it Tel: (+39) 050 97 02 07 Fax: (+39) 050 31 36 588
participants (2)
-
Vincenzo Di Somma -
박 재성