RE: [Zope] SQL Method, dtml-with and namespace weirdness
Sorry - I'm being unclear: the result is exactly the same either way i.e. the variables "name" and "domain" seem to be reset to the values from outside the dtml-in block when entering the dtml-with block. I'm wondering if it's a bug in the postgres DA, since I can't reproduce it with a quick gadfly test. I'm just going to try it out now. I'm using Zope 2.2.5, PoPy 2.0.1 from SourceForce, and ZPoPyDA-1.1-pre2 - I couldn't get any (potentially more stable) combination of PoPy or ZPoPyDA to work. Regards, Phil +----------------------------------+ | Phil Mayers, Network Support | | Centre for Computing Services | | Imperial College | +----------------------------------+ -----Original Message----- From: Chris Withers [mailto:chrisw@nipltd.com] Sent: 10 January 2001 13:30 To: Mayers, Philip J Cc: 'zope@zope.org' Subject: Re: [Zope] SQL Method, dtml-with and namespace weirdness "Mayers, Philip J" wrote:
Change your show method in root to be as follows:
<dtml-in get_machine_hosts> <dtml-var show_row> <dtml-in get_host_aliases> <dtml-var show_row> </dtml-in> </dtml-in>
And add another DTML method in root as follows:
show_row: <TR> <TD><dtml-var ip missing></TD> <TD>&dtml-name;</TD> <TD>&dtml-domain;</TD> </TR>
so you have: /root get_machine_hosts (SQL method) get_host_aliases (SQL method) show (dtml method) show_row (dtml method)
That was how I had the code originally. Didn't help.
What happens when you try that? Errors? Unexpected values?
I've already read the Zope 'book'
Yes, it is frustrating how long it's taking for that to get printed, I wonder what's holding it up?
(if I were using 2.3 (which I can't, because LoginManager doesn't work OOTB),
I remember seeing the posts relating to that, did you ever find out why it wasn't working?
I'd be using Python methods to do most of this instead. I'm not, I'm using 2.2.5)
Wise choice, but you mean python scripts in 2.3 ;-) You can actually download Python _Methods_ right now and use them in 2.2.5: http://www.zope.org/Members/4am/PythonMethod cheers, Chris
"Mayers, Philip J" wrote:
Sorry - I'm being unclear: the result is exactly the same either way i.e. the variables "name" and "domain" seem to be reset to the values from outside the dtml-in block when entering the dtml-with block.
Change your show method in root to be as follows:
<dtml-in get_machine_hosts> <dtml-var show_row> <dtml-in get_host_aliases> <dtml-var show_row> </dtml-in> </dtml-in>
And add another DTML method in root as follows:
show_row: <TR> <TD><dtml-var ip missing></TD> <TD>&dtml-name;</TD> <TD>&dtml-domain;</TD> </TR>
Now I could grep the above to be sure, but I'm prety certain there aren't any dtml-with's in there... Perhaps the above might be worth trying out? ;-) cheers, Chris
participants (2)
-
Chris Withers -
Mayers, Philip J