[Zope] External Method
Dmitry B. Khlonin
khl@paloma.spbu.ru
Fri, 7 May 1999 20:30:37 +0400
This is a multi-part message in MIME format.
------=_NextPart_000_0019_01BE98C8.77137E80
Content-Type: text/plain;
charset="koi8-r"
Content-Transfer-Encoding: quoted-printable
I tried to create External Method from
start_dtml:
<!--#call =
"manage_addExternalMethod('Method1','sss','login','methLoginUser')"-->
login.py:
def methLoginUser():
return "I dont know"
but view of start_dtml is dangerous:
System Unavailable=20
This site is currently experiencing technical difficulties. Please =
contact the site administrator for more information. For additional =
technical information, please refer to the HTML source for this page. =
Thank you for your patience.
what it mean? trying to view traceback information I see:
Traceback (innermost last):
File C:\Program Files\WebSite\lib\python\ZPublisher\Publish.py, line =
877, in publish_module
File C:\Program Files\WebSite\lib\python\ZPublisher\Publish.py, line =
590, in publish
(Info: /start_dtml)
File C:\Program Files\WebSite\lib\python\OFS\DTMLDocument.py, line =
212, in __call__
(Object: start_dtml)
File C:\Program Files\WebSite\lib\python\OFS\DTMLDocument.py, line =
208, in __call__
(Object: start_dtml)
File C:\Program =
Files\WebSite\lib\python\DocumentTemplate\DT_String.py, line 513, in =
__call__
(Object: start_dtml)
File C:\Program Files\WebSite\lib\python\DocumentTemplate\DT_Util.py, =
line 266, in eval
(Object: =
manage_addExternalMethod('Method1','sss','login','methLoginUser'))
File <string>, line 0, in ?
File C:\Program =
Files\WebSite\lib\python\Products\ExternalMethod\ExternalMethod.py, line =
127, in manage_addExternalMethod
(Object: ApplicationDefaultPermissions)
File C:\Program Files\WebSite\lib\python\Globals.py, line 227, in =
__call__
(Object: manage_main)
File C:\Program =
Files\WebSite\lib\python\DocumentTemplate\DT_String.py, line 513, in =
__call__
(Object: manage_main)
File C:\Program Files\WebSite\lib\python\Globals.py, line 227, in =
__call__
(Object: manage_tabs)
File C:\Program =
Files\WebSite\lib\python\DocumentTemplate\DT_String.py, line 513, in =
__call__
(Object: manage_tabs)
File C:\Program Files\WebSite\lib\python\DocumentTemplate\DT_In.py, =
line 675, in renderwob
(Object: manage_options)
File C:\Program Files\WebSite\lib\python\DocumentTemplate\DT_Util.py, =
line 266, in eval
(Object: _vars['PATH_INFO'][-(_.len(action)):]=3D=3Daction)
File <string>, line 0, in ?
File C:\Program Files\WebSite\lib\python\DocumentTemplate\DT_Util.py, =
line 150, in careful_getitem
KeyError: (see above)
What I doing wrong?
------=_NextPart_000_0019_01BE98C8.77137E80
Content-Type: text/html;
charset="koi8-r"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD W3 HTML//EN">
<HTML>
<HEAD>
<META content=3Dtext/html;charset=3Dkoi8-r http-equiv=3DContent-Type>
<META content=3D'"MSHTML 4.71.2110.0"' name=3DGENERATOR>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT color=3D#000000 face=3D"Arial Cyr" size=3D2>I tried to create =
External=20
Method from</FONT></DIV>
<DIV><FONT color=3D#000000 face=3D"Arial Cyr" =
size=3D2>start_dtml:</FONT></DIV>
<DIV><FONT color=3D#000000 face=3D"Arial Cyr" =
size=3D2> <!--#call=20
"manage_addExternalMethod('Method1','sss','login','methLoginUser')&q=
uot;--><BR>login.py:</FONT> </DIV>
<DIV><FONT color=3D#000000 face=3D"Arial Cyr" size=3D2>def=20
methLoginUser():<BR> return =
"I=20
dont know"<BR>but view of start_dtml is =
dangerous:</FONT> </DIV>
<DIV><FONT color=3D#000000 face=3D"Arial Cyr" size=3D2><FONT =
size=3D4><FONT=20
size=3D5>System Unavailable </FONT></FONT>
<P>This site is currently experiencing technical difficulties. Please =
contact=20
the site administrator for more information. For additional technical=20
information, please refer to the HTML source for this page. Thank you =
for your=20
patience.</P>
<P>what it mean? trying to view traceback information I see:</P>
<P>Traceback (innermost last):<BR> File C:\Program=20
Files\WebSite\lib\python\ZPublisher\Publish.py, line 877, in=20
publish_module<BR> File C:\Program=20
Files\WebSite\lib\python\ZPublisher\Publish.py, line 590, in=20
publish<BR> (Info: /start_dtml)<BR> File =
C:\Program=20
Files\WebSite\lib\python\OFS\DTMLDocument.py, line 212, in=20
__call__<BR> (Object: start_dtml)<BR> File =
C:\Program=20
Files\WebSite\lib\python\OFS\DTMLDocument.py, line 208, in=20
__call__<BR> (Object: start_dtml)<BR> File =
C:\Program=20
Files\WebSite\lib\python\DocumentTemplate\DT_String.py, line 513, in=20
__call__<BR> (Object: start_dtml)<BR> File =
C:\Program=20
Files\WebSite\lib\python\DocumentTemplate\DT_Util.py, line 266, in=20
eval<BR> (Object:=20
manage_addExternalMethod('Method1','sss','login','methLoginUser'))<BR>&nb=
sp;=20
File &lt;string&gt;, line 0, in ?<BR> File C:\Program=20
Files\WebSite\lib\python\Products\ExternalMethod\ExternalMethod.py, line =
127, in=20
manage_addExternalMethod<BR> (Object:=20
ApplicationDefaultPermissions)<BR> File C:\Program=20
Files\WebSite\lib\python\Globals.py, line 227, in =
__call__<BR> =20
(Object: manage_main)<BR> File C:\Program=20
Files\WebSite\lib\python\DocumentTemplate\DT_String.py, line 513, in=20
__call__<BR> (Object: manage_main)<BR> File =
C:\Program=20
Files\WebSite\lib\python\Globals.py, line 227, in =
__call__<BR> =20
(Object: manage_tabs)<BR> File C:\Program=20
Files\WebSite\lib\python\DocumentTemplate\DT_String.py, line 513, in=20
__call__<BR> (Object: manage_tabs)<BR> File =
C:\Program=20
Files\WebSite\lib\python\DocumentTemplate\DT_In.py, line 675, in=20
renderwob<BR> (Object: manage_options)<BR> File=20
C:\Program Files\WebSite\lib\python\DocumentTemplate\DT_Util.py, line =
266, in=20
eval<BR> (Object:=20
_vars['PATH_INFO'][-(_.len(action)):]=3D=3Daction)<BR> File=20
&lt;string&gt;, line 0, in ?<BR> File C:\Program=20
Files\WebSite\lib\python\DocumentTemplate\DT_Util.py, line 150, in=20
careful_getitem<BR>KeyError: (see above)<BR> </P>
<P>What I doing wrong?</P>
<P> </P></FONT></DIV></BODY></HTML>
------=_NextPart_000_0019_01BE98C8.77137E80--