[Zope] Help: dtml-var expr -> DTML method -> ZSQL method
Andrews, Martin
mandrews@netgenics.com
Mon, 12 Feb 2001 12:09:30 -0500
I was pretty sure the problem was that I was losing context when calling
get_rid() - but for the life of me I cannot figure out how to pass it on -
trying:
<dtml-var expr="get_rid(_.None, REQUEST)">
still gives me the NameError for next_rid - but the first one works:
<dtml-var expr="get_rid(_.None, _)">
Anyone care to illuminate me as to why (what am I doing with the call above?
Thanks,
Martin
> -----Original Message-----
> From: Mayers, Philip J [mailto:p.mayers@ic.ac.uk]
> Sent: Monday, February 12, 2001 5:45 AM
> To: 'Martin Andrews'; 'zope@zope.org'
> Subject: RE: [Zope] Help: dtml-var expr -> DTML method -> ZSQL method
>
>
> The DTML method call:
>
> <dtml-var expr="get_rid()">
>
> Will call get_rid without a "namespace", so get_rid can't
> lookup next_rid,
> and therefore it fails. Try this:
>
> <dtml-var expr="get_rid(_.None, _)">
>
> Try the Zope "Help" link from the management interface, go
> "Zope Help",
> "Zope API", "DTML Method", and lookup the API for __call__:
>
> __call__(client=None, REQUEST={}, **kw):
>
>
> So, clearly this will work:
>
> <dtml-var expr="get_rid(_.None, REQUEST)">
>
> Namespaces are hard!
>
> Regards,
> Phil