예제 #1
0
파일: page.py 프로젝트: appmode/openW3
    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 = []
예제 #2
0
파일: page.py 프로젝트: appmode/openW3
	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			= []
예제 #3
0
파일: view.py 프로젝트: appmode/openW3
		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)
예제 #4
0
        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)