On 5/25/05, Jan-Wijbrand Kolman <[EMAIL PROTECTED]> wrote:
> Hello,
> 
> 
(..)
> Now I want this FooFolder to become a site right after having added it (so,
> instead of doing this from the ZMI). I naively thought to do this in the
> FooFolder's __init__, like so:
> 

What I currently do is:

Derive from Folder and SiteManagerContainer, and in the __init__ do
the following:

        self.setSiteManager(LocalSiteManager(self))
        ## required for getUtility to work within this request
        setSite(self)

(actually I'm doing this from an event handler, but it should just
work from __init__ afaik)

Cheers

  Ivo

-- 
Drs. I.R. van der Wijk                                      -=-
Korte Leidsedwarsstraat 12                                 Amaze
1017 RC Amsterdam, NL                                       -=-
T +31-20-4688336         F +31-20-4688337       Zope/Plone/Content Management
W http://www.amaze.nl    E [EMAIL PROTECTED]           Open Source Solutions
W http://vanderwijk.info E [EMAIL PROTECTED]                 Consultancy
PGP http://vanderwijk.info/pgp
_______________________________________________
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users

Reply via email to