[Zope] a question on external methods
David Wagle
david.a.wagle@healthpartners.com
Tue, 16 Feb 1999 13:42:21 -0600 (CST)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Can someone tell me what I'm doing wrong?
I have the VERY simple external methods test.xm and test2.xm
defined.
They are:
from DateTime import DateTime
def dwTime(self):
t=DateTime()
return DateTime.timeTime(t)
def dwName(self,REQUEST=None):
return "%s" % REQUEST['AUTHENTICATED_USER']
They both work fine from the Zope/manage screen using the
'try-it' tab.
When I use them in a test file:
<!--#var standard_html_header-->
<!--#var test.xm-->
<!--#var test2.xm-->
<!--#var standard_html_footer-->
The first (<!--#var test.xm-->) works just fine.
but the addition of the second, causes the following
run-time error:
Traceback (innermost last):
File /usr/local/Zope-1.9.0-src/lib/python/ZPublisher/Publish.py, line 879, in publish_module
File /usr/local/Zope-1.9.0-src/lib/python/ZPublisher/Publish.py, line 595, in publish
(Info: /test_area/test1)
File /usr/local/Zope-1.9.0-src/lib/python/OFS/Document.py, line 181, in __call__
(Object: test1)
File /usr/local/Zope-1.9.0-src/lib/python/OFS/Document.py, line 177, in __call__
(Object: test1)
File /usr/local/Zope-1.9.0-src/lib/python/DocumentTemplate/DT_String.py, line 514, in __call__
(Object: test1)
File /usr/local/Zope-1.9.0-src/lib/python/Products/ExternalMethod/ExternalMethod.py, line 266, in __call__
(Object: Item)
(Info: ((), {}, (None,)))
TypeError: (see above)
- ---------------------------------------------
A computer without Microsoft products is like
a dog without bricks chained to its head
- ---------------------------------------------
-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Comment: Processed by Mailcrypt 3.5.1, an Emacs/PGP interface
Charset: noconv
iQA/AwUBNsnKG9tGhckXZmDjEQJJpwCfeziCLyeaVw0/h3FfcAE2JJ3uQrQAoNbJ
E+U2HC4yTS/aZQmJb0XO6YLk
=ApHz
-----END PGP SIGNATURE-----