[Zope] DTML (unicode) does not work for me.

Christopher Lozinski lozinski at freerecruiting.com
Wed Jan 7 22:02:23 EST 2004


I am trying to develop Unicode web pages, with variable names
substituted in using the DTML technology.  Sadly it does not work. 

#HERE IS THE CODE FOR a PYTHON SCRIPT WHICH CRASHES
from Products.PythonScripts.standard import DTML
request = container.REQUEST
RESPONSE = request.RESPONSE

# THE FOLLOWING LINE WORKS, DEMONSTRATING MY SCRIPT IS CORRECT
#FOR ASCII STRINGS PASSED TO THE DTML COMMAND.
#myString = 'Hello <dtml-var id>'

#BUT IF YOU USE THE FOLLOWING LINE INSTEAD IT CRASHES
#WHICH DEMONSTRATES THAT DTML(unicode) needs work.
myString=_.unicode('Hello <dtml-var id>')

myDTML = DTML(myString)
return myDTML(context,request)

HERE ARE THE ERROR MESSAGES

2004/01/07 05:04:02.611 GMT
User Name (User Id) lozinski (lozinski)
Request URL http://ceo.jobmart.com/Resumes/TestDTML
Exception Type TypeError
Exception Value object of type 'unicode' is not callable

Any help would be much appreciated.


Regards
Christopher Lozinski
lozinski at freerecruiting.com
510 795 6086




More information about the Zope mailing list