[ZPT] user variable and python products
Clint Brubakken
cabrubak@inetic.com
11 Oct 2001 10:57:08 -0500
In the page template Product/www/index_html.zpt .
If I have the following:
<em tal:content="user/getUserName"></em>
I get the error:
Error Type: Undefined
Error Value: "user" not found in "user/getUserName"
but
<em tal:content="request/AUTHENTICATED_USER/getUserName">template
id</em>
work correctly.
It seems somehow the user variable is not being set
On 11 Oct 2001 11:26:22 -0400, Evan Simpson wrote:
> Clint Brubakken wrote:
>
> > I've created a python product with some zpt pages, that are include by :
> > index_html = PageTemplateFile('www/index_html',globals())
> >
> > I use a macro on this template that accesses the "user" variable. I get
> > a name error on user when the template is viewed, where the object is
> > stored.
> >
> > When I wrapped all exprssions that access with <span
> > tal:condition="user | nothing"></span> it works
>
> Could you elaborate? I didn't quite follow your explanation. Where is
> "user" referenced?
>
> Cheers,
>
> Evan @ Zope
>
>
--
Clint Brubakken <cabrubak@inetic.com>
Programmer Analyst
Inetic Web Development
---
Black holes are where God divided by zero.