[Zope] how do i escape a name with . in it?

Navindra Umanee navindra@cs.mcgill.ca
Mon, 10 Jun 2002 01:04:51 -0400


Hi!

Bakhtiar A Hamid <kedai@kedai.com.my> wrote:
> <untested>
> <dtml-in expr="_['dot.kde.org'](sort_on='date',sort_order='reverse')" size=40>

This looks like it should work, unfortunately I get an error along the
lines of:

 <strong>Error Type: AttributeError</strong><br>
 <strong>Error Value: no __call__ method defined</strong><br>

  File /var/zope/lib/python/DocumentTemplate/DT_Util.py, line 339, in eval
    (Object: _['dot.kde.org'](sort_on='date',sort_order='reverse'))
    (Info: _)

Any idea why?  I'm pretty sure 'Squishdot Site' is callable this way,
because I know at least 2 people doing it (but they don't have the
. problem).  Also, SquishSite subclasses ZCatalog, and SquishSite
defines the __call__ method here:

    # Searchable interface
    security.declareProtected(View, '__call__')
    def __call__(self, REQUEST=None, internal=0, **kw):
        brains = apply(self.searchResults,(REQUEST,),kw)
        if internal:
            return map(lambda x: x.getObject(), brains)
        return brains

If you have any thoughts on what may be going wrong, I'd appreciate
it.  I'll check out the Python code when I get a chance.

Thanks,
Navin.