SOLVED: [Zope] Problem: Calling DTML Method from ZPT
Mike Murphy
Mike Murphy" <mike@flipper.eskimo.net
Sun, 5 Aug 2001 00:35:47 -0700
The suggestion to add 'request' to the DTML call did the trick! The
following is what works
<p tal:replace="python:root.games.hangman.index_html(root.games.hangman,
request)"/>
Thanks to all who replied with suggestions--hope this helps someone else.
Mike
(BTW, what probably complicated matters is that my zope is probably not
installed quite right... I think I have a permissions problem somewhere...
it gives me a _v_blocks attribute error when I try to view SQL methods,
etc..)
----- Original Message -----
From: "Dieter Maurer" <dieter@handshake.de>
To: "Mike Murphy" <mike@flipper.eskimo.net>
Cc: <zope@zope.org>
Sent: Friday, August 03, 2001 6:21 PM
Subject: Re: [Zope] Problem: Calling DTML Method from ZPT
> Mike Murphy writes:
> > I am having problems executing a DTML Method from a ZPT. I have been
> > unable to find documentation regarding whether this is even possible or
not.
> It is possible (we do it with great success).
>
> > Here are a couple of examples:
> >
> > <!-- With this snippet, I get the DTML unrendered: -->
> > <p tal:replace="python:root.games.hangman.index_html"></p>
> You forget to call the DTML object. Use:
> <p
tal:replace="python:root.games.hangman.index_html(here,request)"></p>
>
> > <!-- With this snippet, I get a TALES error and a big stack trace: -->
> > <p tal:replace="root/games/hangman/index_html"></p>
> This should work.
>
> The "TALES" error (last PageTemplate release!) should tell you
> (and maybe us) more about the problem cause.
>
> > Anybody have any ideas what it is that I am doing wrong? I like ZPT
> > conceptually, and ran into this snag while converting some of my DTML.
(I
> > am running Zope 2.4.0 with the latest hotfix.)
> You information is a bit scarce.
>
>
> Dieter
>
> _______________________________________________
> Zope maillist - Zope@zope.org
> http://lists.zope.org/mailman/listinfo/zope
> ** No cross posts or HTML encoding! **
> (Related lists -
> http://lists.zope.org/mailman/listinfo/zope-announce
> http://lists.zope.org/mailman/listinfo/zope-dev )
>