Julio Mendoza
jm at eemsystems.cjb.net
Wed Oct 15 15:44:15 EST 2003
I run this scripts from another client machine and are working good. look like browser problem in Debian/unstable. thank you, JM El mié, 15-10-2003 a las 15:03, Julio Mendoza escribió: > this scrips was working good, but now i can't find what is the problem. > This was working in the following manner: > > the firt time you call testpy control='' > > then testpy return a html form with the variable: Fecha_Inicial, > Fecha_Final (in this case) an a hidden control with value '1' > > The form action is the same function testpy, then in the second pass > control must be '1'... but this is not actualy the case. > > I'm using python from debian/unstable > > > > *********************************************************************** > > def testpy(req,control=''): > if control=='': > return > aaa.simpleform2('./testpy',"Fecha_Inicial,Fecha_Final","Pacientes por > Medicos") > elif control=='1': > [Fecha_Inicial,Fecha_Final]=[req.form["Fecha_Inicial"],req.form["Fecha_Final"]] > if len(Fecha_Final)<3: > Fecha_Final=Fecha_Inicial > return Fecha_Inicial,Fecha_Final,control > > ************************************************************************ > #module: aaa > > > def simpleform2(action,strparametros,titulo='',insertar=''): > import string > s='''<form method="post" action="''' +action+ '"><input type="hidden" > name="control" value="1">' > parametros=string.split(strparametros,',') > if len(strparametros)>2: > s=s+"""<table><caption>"""+titulo+"""</caption>""" > for i in parametros: > s=s+"""<tr><td>"""+i+''':</td> > <td><input type="text" name="'''+i+'''" size="20" maxlength="30" > value=""> > </td> > </tr>''' > s=s+'</table>' > s=s+insertar+'<br><input TYPE="submit" VALUE="Aceptar"></form>' > return s > *************************************************************************** > > _______________________________________________ > Mod_python mailing list > Mod_python at modpython.org > http://mailman.modpython.org/mailman/listinfo/mod_python
|