Пример #1
0
class RHGetVarsJs(RHTemplateContentJS):
    _uh = urlHandlers.Derive(RHTemplateContentJS, "getVars")

    def _process(self):
        self._tplName = 'vars.js'
        self._dict = {}

        return RHTemplateContentJS._process(self)
Пример #2
0
class RHRegistrantNewForm(RHRegistrantListModifBase):
    _uh = urlHandlers.Derive(RHRegistrantListModif, "newRegistrant")

    def _checkParams(self, params):
        RHRegistrantListModifBase._checkParams(self, params)

    def _process(self):
        p = registrationForm.WPRegistrationFormDisplay(self, self._conf)
        return p.display()
Пример #3
0
class RHGetVarsJs(RHTemplateContentJS):
    _uh = urlHandlers.Derive(RHTemplateContentJS, "getVars")

    _tplName = 'vars.js'

    def __init__(self, req):
        RHTemplateContentJS.__init__(self, req)
        self._dict = {}

    @classmethod
    def removeTmpVarsFile(cls):
        cfg = Config.getInstance()
        fileName = cfg.getTPLFile(cls._tplName)

        if fileName == "":
            fileName = "%s.tpl" % cls._tplName

        htmlPath = os.path.join(cfg.getTempDir(), fileName + ".tmp")
        if os.access(htmlPath, os.R_OK):
            os.remove(htmlPath)