コード例 #1
0
ファイル: workflow.py プロジェクト: bendavis78/zope
def _initDCWorkflowScripts( workflow, scripts, context ):

    """ Initialize DCWorkflow scripts
    """
    for s_info in scripts:

        id = str( s_info[ 'script_id' ] ) # no unicode!
        meta_type = s_info[ 'meta_type' ]
        filename = s_info[ 'filename' ]

        file = context.readDataFile( filename )

        if meta_type == PythonScript.meta_type:
            script = PythonScript( id )
            script.write( file )

        #elif meta_type == ExternalMethod.meta_type:
        #    script = ExternalMethod( id, title, module, function )

        elif meta_type == DTMLMethod.meta_type:
            script = DTMLMethod( file, __name__=id )

        workflow.scripts._setObject( id, script )
コード例 #2
0
ファイル: FSDTMLMethod.py プロジェクト: bendavis78/zope
 def _createZODBClone(self):
     """Create a ZODB (editable) equivalent of this object."""
     return DTMLMethod(self.read(), __name__=self.getId())