[Zapp-cvs-commit] ZApp ZApp_CMFBase.py,1.16.2.5,1.16.2.6
Brought to you by:
sspickle
|
From: <ssp...@us...> - 2003-10-28 18:33:29
|
Update of /cvsroot/zapp/ZApp
In directory sc8-pr-cvs1:/tmp/cvs-serv2885
Modified Files:
Tag: CMF_relations
ZApp_CMFBase.py
Log Message:
fixed subclassing problem!
Index: ZApp_CMFBase.py
===================================================================
RCS file: /cvsroot/zapp/ZApp/ZApp_CMFBase.py,v
retrieving revision 1.16.2.5
retrieving revision 1.16.2.6
diff -C2 -d -r1.16.2.5 -r1.16.2.6
*** ZApp_CMFBase.py 28 Oct 2003 15:43:33 -0000 1.16.2.5
--- ZApp_CMFBase.py 28 Oct 2003 18:33:19 -0000 1.16.2.6
***************
*** 40,44 ****
import tempfile
! class ZApp_CMFBase(FreeRangeDS, ZApp_Base, SkinnedFolder, DefaultDublinCoreImpl, ZApp_MiscDataUser, ZApp_RelatedObject):
meta_type = 'ZApp CMF Content'
--- 40,44 ----
import tempfile
! class ZApp_CMFBase(FreeRangeDS, SkinnedFolder, ZApp_Base, DefaultDublinCoreImpl, ZApp_MiscDataUser, ZApp_RelatedObject):
meta_type = 'ZApp CMF Content'
***************
*** 70,80 ****
def calcPathID(self):
! if self.id.find(',') != -1:
! result = self.id
! else:
! objPath = ','.join(self.getPhysicalPath())
! portalPath = ','.join(self.portal_url.getPortalObject().getPhysicalPath()) + ','
! result = objPath[len(portalPath)-1:]
!
return result
--- 70,84 ----
def calcPathID(self):
!
! try:
! if self.id.find(',') != -1:
! result = self.id
! else:
! objPath = ','.join(self.getPhysicalPath())
! portalPath = ','.join(self.portal_url.getPortalObject().getPhysicalPath()) + ','
! result = objPath[len(portalPath)-1:]
! except:
! raise
!
return result
***************
*** 111,115 ****
ZApp_LOG("_notifyOfCopyTo: Setting safeStorageID to " + safeStorageID)
! def __getstate__(self):
"""
getstate is called when an object is being 'saved'
--- 115,119 ----
ZApp_LOG("_notifyOfCopyTo: Setting safeStorageID to " + safeStorageID)
! def ___getstate__(self):
"""
getstate is called when an object is being 'saved'
***************
*** 120,124 ****
return result
! def __setstate__(self, state):
"""
calling setstate.. set state gets called when an object is pulled into memory
--- 124,128 ----
return result
! def ___setstate__(self, state):
"""
calling setstate.. set state gets called when an object is pulled into memory
***************
*** 255,258 ****
--- 259,264 ----
if id.find(',') != -1:
raise RuntimeError, "Sorry.. no ',' allowed in id!"
+
+ print "Adding CMF object ", id, " to ", self.getId()
if useExisting:
***************
*** 367,370 ****
--- 373,384 ----
, 'action': 'string:${object_url}/metadata_edit_form'
, 'permissions' : (CMFCorePermissions.ModifyPortalContent,)},
+ { 'id' : 'subobjects'
+ , 'name' : 'SubObjects'
+ , 'action': 'string:${object_url}/zapp_cmf_sub_contents'
+ , 'permissions' : (CMFCorePermissions.View,)},
+ { 'id' : 'test'
+ , 'name' : 'Test'
+ , 'action': 'string:${object_url}/zapp_cmf_object_test'
+ , 'permissions' : (CMFCorePermissions.ManagePortal,)},
),
},
|