[Zope] a question about python and DtmlMethod in ZOPE

leiz@esiee.fr leiz@esiee.fr
Thu, 26 Jun 2003 14:29:41 +0300


hello.

I want to return a dtmlMethod in a python script in Zope as follow,
but I failed.

the python script is:
-----------
stuff =3D 'Nom;Prenom;Adresse;T=E9l=E9phone;Email \n'

for result1 in context.DataBase.Query_cand.liste_all_dossiers():
    for result2 in
context.DataBase.Query_cand.liste_info_dossier(nom_user=3Dresult1.c_user
name):
      stuff =3D stuff + result2.nom + ';'
      stuff =3D stuff + result2.prenom + ';'
      stuff =3D stuff + result2.adresse + ';'
      stuff =3D stuff + result2.tel + ';'
      stuff =3D stuff + result2.email + '\n'

context.manage_delObjects('Data_cand')   =20
context.manage_addFile('Data_cand')
context.Data_cand.manage_edit('Donn=E9es de la table
Candidats','application/msword','',stuff)

return context.Data_cand_view
-----------

in which the 'Data_cand_view' is a DtmlMethod, but it isn't returned.