Exemple #1
0
    def __init__(self):
        htmlAction.__init__(self)
        self.privData = {
            'GENDER_LIST':  { 1:'男', 0: '女'},
            'STATUS_LIST':  { 1:'已读', 0: '未读'},
            'TYPES_LIST':   { 1:'铝芯', 0: '铜芯'},
            'ACCOUNTINGS_STATUS':   { 2: '未同意', 1:'已审核', 0: '未审核'},
            'NAME':         config.NAME,
        }

        self.tmplDir = config.WAP_TMPLS_DIR
        self.render = web.template.render(self.tmplDir, globals=self.globalsTmplFuncs)
        self.privData['render'] = self.render
Exemple #2
0
    def __init__(self, chkLogin=True, chkInstall=True):
        htmlAction.__init__(self)
        self.privData = {
            'GROUP_PRICE_TYPES':  { 1:'老师上门', 0: '学生上门'},
            'GENDER_LIST':  { 1:'男', 0: '女'},
            'STATUS_LIST':  { 1:'发布', 0: '草稿'},
            'NAME':         config.NAME,
        }

        self.tmplDir = config.TMPL_DIR
        self.render = web.template.render(self.tmplDir, globals=self.globalsTmplFuncs)
        self.privData['render'] = self.render
        
        if chkLogin and not self.isLogin():
            raise web.seeother(self.makeUrl('/admin/login'))

        if chkInstall and not self.isInstalled():
            raise web.seeother(self.makeUrl('/admin/install'))
Exemple #3
0
    def __init__(self, chkLogin=True, chkInstall=True):
        htmlAction.__init__(self)
        self.privData = {
            "GENDER_LIST": {1: "男", 0: "女"},
            "STATUS_LIST": {1: "已读", 0: "未读"},
            "TYPES_LIST": {1: "铝芯", 0: "铜芯"},
            "ACCOUNTINGS_STATUS": {2: "未同意", 1: "已审核", 0: "未审核"},
            "NAME": config.NAME,
        }

        self.tmplDir = config.ADMIN_TMPLS_DIR
        self.render = web.template.render(self.tmplDir, globals=self.globalsTmplFuncs)
        self.privData["render"] = self.render

        if chkLogin and self.isLogin() != "admin":
            raise web.seeother(self.makeUrl("/admin/login"))

        if chkInstall and not self.isInstalled():
            raise web.seeother(self.makeUrl("/admin/install"))