[Zope] python functions and ZPT

Andreas Pakulat ap125@informatik.uni-rostock.de
Tue, 20 May 2003 22:34:42 +0200


--a8Wt8u1KmwUX3Y2C
Content-Type: text/plain; charset=iso-8859-1
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Hi,

got a small question here using the following ZPT:

| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
| <!--	"http://www.w3.org/TR/html4/transitional.dtd"> -->
| <html metal:use-macro=3D"here/std_template/macros/template">
|=20
| <span metal:fill-slot=3D"body">
| 	<span tal:condition=3D"python: not here.is_logged_on()">
| 		<h3>Sie sind nun Ausgeloggt</h3>
| 		<a href=3D"index_html" tal:attributes=3D"href request/came_from">Zur&uu=
ml;ck</a>
| 	</span>
| 	<span tal:condition=3D"python:here.is_logged_on()">
| 		Sie sind noch mittels HTTP-Authentication eingelogged. Sie sich m=FCssen
| 		eventuell <a href=3D"/manage_zmi_logout">aus dem Zope Managment Interfa=
ce
| 		ausloggen</a>.
| 	</span>
| </span>
| </html>

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.

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.

Andreas

--=20
Your reasoning is excellent -- it's only your basic assumptions that are wr=
ong.

--a8Wt8u1KmwUX3Y2C
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)

iD8DBQE+ypFiuekl0h+nrMIRAj/AAJ0QI2E+BrT0ZMd27pSzbfqu9qQQuACgkUYm
kxeJGborgn9Lw5rE52KhMnY=
=SCkv
-----END PGP SIGNATURE-----

--a8Wt8u1KmwUX3Y2C--