From zope Tue May 20 22:07:29 2003 From: Andreas Pakulat Date: Tue, 20 May 2003 22:07:29 +0000 To: zope Subject: Re: [Zope] python functions and ZPT X-MARC-Message: https://marc.info/?l=zope&m=105346855529214 MIME-Version: 1 Content-Type: multipart/mixed; boundary="--4bRzO86E/ozDv8r1" --4bRzO86E/ozDv8r1 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 20.Mai 2003 - 16:30:34, J Cameron Cooper wrote: > > > > > >got a small question here using the following ZPT: > > > >| > >| > >| > >|=20 > >| > >| > >|

Sie sind nun Ausgeloggt

> >| >request/came_from">Zurück > >|
> >| > >| Sie sind noch mittels HTTP-Authentication eingelogged. Sie=20 > >sich m=FCssen > >| eventuell aus dem Zope=20 > >Managment Interface > >| ausloggen. > >| > >|
> >| > > > >I get an attribute error about request when opening this ZPT with > >the following link=20 > >logout_form?came_from=3Dhttp://localhost:9673/index_html > > > >How can this happen? I have not "request" within the macro, the only=20 > >request/ object is up there in the ZPT. > > > Are you sure about that? There's something going on outside what you=20 > have written above. It worked for me with a dead simple std_template and= =20 > without the is_logged_on() bits. So I suspect one of those is the=20 > culprit. How does it work without the macro and/or method calls? This was really my fault, I confused python and tal request Objects, the python one has to be written in uppercase, which solved this. Also I don't need any python script in this anymore :) > >Another question: Is it possible to call python methods from ZPT, which > >are defined in a python script? I have several scripts and would like to > >hold them in 1 script-Object in Zope, as they all belong to the > >login-process. > >=20 > > > A Python script is really a method in itself. You can stick a bunch of=20 > them in a folder and call them like 'folder.somescript()' if you want to= =20 > simulate a module for organizational reasons. As said above, I don't need them anymore, but that solution is not as beautiful as a real module with methods. Andreas --=20 Your step will soil many countries. --4bRzO86E/ozDv8r1 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.2 (GNU/Linux) iD8DBQE+yqchuekl0h+nrMIRAvpnAKCYwSUUErXMjiW3aNK6cW1MstsG+wCgwrm1 9Kfj0tYzWxy+mJnDIsm/otA= =gvkS -----END PGP SIGNATURE----- --4bRzO86E/ozDv8r1-- _______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )