[Zope-CMF] [dev] five.localsitemanager: site manager names

yuppie y.2008 at wcm-solutions.de
Sun Nov 16 10:22:18 EST 2008


Hi!


Trying to clean up site creation in CMF, I noticed this issue:

zope.app.component uses a hardcoded '++etc++site' as name, but 
five.localsitemanager's make_site function computes it like this:

     name = 'five'
     path = getattr(obj, 'getPhysicalPath', None)
     if path is not None and callable(path):
         name = '/'.join(path())

So the name is location dependent. Moving the site would require 
updating the name, but there is no event handler that does it.

I see 2 possible ways to fix this:

1.) Add an event handler that updates the name.

2.) Use the same hardcoded name as Zope 3. A customized __repr__ method 
could still show the complete path, at least as long as the active site 
is set accordingly.

Any thoughts? I prefer solution 2.


Cheers,

     Yuppie



More information about the Zope-CMF mailing list