2009-06-29 07:06:01 -05:00
|
|
|
<!codeHeader!>
|
2011-11-25 11:01:20 -06:00
|
|
|
from OFS.SimpleItem import SimpleItem
|
|
|
|
from OFS.Folder import Folder
|
|
|
|
from appy.gen.utils import createObject
|
2009-06-29 07:06:01 -05:00
|
|
|
from AccessControl import ClassSecurityInfo
|
2011-11-25 11:01:20 -06:00
|
|
|
import Products.<!applicationName!>.config as cfg
|
2011-12-05 08:11:29 -06:00
|
|
|
from appy.gen.mixins import BaseMixin
|
|
|
|
from appy.gen.mixins.ToolMixin import ToolMixin
|
2011-12-05 03:52:18 -06:00
|
|
|
from wrappers import <!genClassName!>_Wrapper as Wrapper
|
2011-11-25 11:01:20 -06:00
|
|
|
|
|
|
|
def manage_add<!genClassName!>(self, id, title='', REQUEST=None):
|
|
|
|
'''Creates instances of this class.'''
|
|
|
|
createObject(self, id, '<!genClassName!>', '<!applicationName!>')
|
|
|
|
if REQUEST is not None: return self.manage_main(self, REQUEST)
|
|
|
|
|
2009-06-29 07:06:01 -05:00
|
|
|
class <!genClassName!>(<!parents!>):
|
|
|
|
'''<!classDoc!>'''
|
|
|
|
security = ClassSecurityInfo()
|
|
|
|
meta_type = '<!genClassName!>'
|
|
|
|
portal_type = '<!genClassName!>'
|
2011-01-14 02:06:25 -06:00
|
|
|
allowed_content_types = ()
|
2009-06-29 07:06:01 -05:00
|
|
|
filter_content_types = 0
|
2011-11-25 11:01:20 -06:00
|
|
|
global_allow = 1
|
|
|
|
icon = "ui/<!icon!>"
|
|
|
|
wrapperClass = Wrapper
|
2011-11-28 15:50:01 -06:00
|
|
|
config = cfg
|
2011-11-25 11:01:20 -06:00
|
|
|
def do(self):
|
|
|
|
'''BaseMixin.do can't be traversed by Zope if this class is the tool.
|
|
|
|
So here, we redefine this method.'''
|
|
|
|
return BaseMixin.do(self)
|
2011-11-28 15:50:01 -06:00
|
|
|
for elem in dir(<!baseMixin!>):
|
|
|
|
if not elem.startswith('__'): security.declarePublic(elem)
|
2009-06-29 07:06:01 -05:00
|
|
|
<!methods!>
|