Re: [Zope-dev] SessionDataManager oddness
Not really. In this case it seems appropriate, in others its not really necessary. I hope my suggestion works. ;-) ----- Original Message ----- From: "Matt Hamilton" <matth@netsight.co.uk> To: "Chris McDonough" <chrism@digicool.com> Sent: Friday, March 02, 2001 10:43 AM Subject: Re: [Zope-dev] SessionDataManager oddness
On Fri, 2 Mar 2001, Chris McDonough wrote:
Try putting the code which adds the session data manager from your class' __init__ into a manage_afterAdd method of your class, e.g.:
def manage_afterAdd(self, item, container): ob = SessionDataManager( id='session_data_mgr', title='', path=None, timeout_mins=20) self._setObject('session_data_mgr', ob)
manage_afterAdd is called automagically by the _setObject machinery at init time, but it gets the object in its acquisition-wrapped context.
OK, thanks, I'll give that a try. For future reference, is there where I should be putting in all code to add objects to a new instance of a folderish class? Currently it is in __init__ (I add a couple of BTreeFolders, and a ZCatalog).
-Matt
-- Matt Hamilton matth@netsight.co.uk Netsight Internet Solutions, Ltd. Business Vision on the Internet http://www.netsight.co.uk +44 (0)117 9090901 Web Hosting | Web Design | Domain Names | Co-location | DB Integration
participants (1)
-
Chris McDonough