def init(self, objPage): self._objPage = objPage self._objFile = orderedDict() self._objUse = orderedDict() self._objJs = orderedDict() self._objCss = orderedDict() self.compiler.form = form.compiler(self.bolSafeMode) self.compiler.widget = self.compiler.form.compiler.widget # compiler commands self.command = []
strFrm = open(strPath + strForm + '.frm') except: strFrm = None # read in .js try: strJsEvents = open(strPath + strForm + '.js') except: strJsEvents = None # read in .py try: strPyEvents = open(strPath + strForm + '.py') except: strPyEvents = None # load the compiler compiler = form.compiler() # compile the form strView = compiler.compileW3(strForm, strFrm, strJsEvents, strPyEvents) # load form py objData = dotDict() if os.path.exists(strPath + strForm + '.load.py'): execfile(strPath + strForm + '.load.py') # render template print '' print template.renderString(strView, objData)