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.



Zope-CMF maillist  -  Zope-CMF@lists.zope.org

See https://bugs.launchpad.net/zope-cmf/ for bug reports and feature requests

Reply via email to