[ZPT] Possible changes to path-related

richard@bizarsoftware.com.au richard@bizarsoftware.com.au
Tue, 01 May 2001 11:25:33 +1000


richard@bizarsoftware.com.au wrote:
>   <input type="text" name="foo:string" value="Sample" tal:attributes="value
> (if exists) request/form/foo">
> 
> with no request/form/foo will result in
> 
>   <input type="text" name="foo:string"
> value="Products.PageTemplates.TALES.Undefined">
> 
> when I would have expected
> 
>   <input type="text" name="foo:string" value="Sample">

This is fixed by changing evaluateText in TALES.py to:

    def evaluateText(self, expr):
        text = self.evaluate(expr)
        if text is not None and text is not Undefined:
            text = str(text)
        return text

I've put this in the issue tracker.


     Richard

-- 
Richard Jones
richard@bizarsoftware.com.au
Senior Software Developer, Bizar Software (www.bizarsoftware.com.au)