folder.manage_addProducts
['Transience'].constructTContainer might work (assuming
"constructTContainer" is the right constructor name, I
didn't check).
- C
Jun 20, 2006, at 9:39 AM, Jonathan wrote:
I have an external method that is trying to create a Transient
Container in a 'temp_folder', as follows:
def BuildGarbageCollector(self):
folder = self.restrictedTraverse('Coz/TempImages')
# Coz/TempImages already exists
folder.constructTContainer(self,
id='GarbageCollector', timeout_mins=10, limit=0,
delNotification=BASEFLDER+'DeleteTempImage')
--
and I get the following error:
Traceback (innermost last):
Module ZPublisher.Publish, line 115, in publish
Module ZPublisher.mapply, line 88, in mapply
Module ZPublisher.Publish, line 41, in call_object
Module FS.DTMLMethod, line 144, in __call__
- <DTMLMethod at /Coz/WUI/tst>
- URL:
- Physical Path: /Coz/WUI/tst
Module DocumentTemplate.DT_String, line 476, in __call__
Module DocumentTemplate.DT_Let, line 75, in render
Module DocumentTemplate.DT_Util, line 196, in eval
- __traceback_info__: document_id
Module <string>, line 1, in <expression>
Module , line 232, in __call__
- __traceback_info__: (('tst',), {}, None)
Module /apps/zope/Extensions/cozumo.py, line 212, in ProcessControl
Module <string>, line 1, in ?
Module /apps/zope/Extensions/cozumo.py, line 219, in subtst
Module /apps/zope/Extensions/cozumo.py, line 2473, in
BuildGarbageCollector
AttributeError: constructTContainer
--
If I change the external method as follows (remove the reference to
'folder'):
constructTContainer(self,
id='GarbageCollector', timeout_mins=10, limit=0,
delNotification=BASEFLDER+'DeleteTempImage')
There is no error, but the TC is created in the wrong folder. I
can manually (thru the ZMI) add a TC to the TempImages folder, but
I can't create one programmatically.
Can anyone point me in the right direction?!
Thanks,
Jonathan
Zope maillist - Zope (AT) zope (DOT) org
** No cross posts or HTML encoding! **
(Related lists -
)
Zope maillist - Zope (AT) zope (DOT) org
** No cross posts or HTML encoding! **
(Related lists -
)