def __init__(self, *request, **kwargs): super(TableHandler, self).__init__(request[0], request[1]) rpath = request[1].path[1:].replace("/", '_') rdslist = op_cursor.execute(globals()[rpath + '_sql']) self.hide = globals().get(rpath + '_hide', []) self.headers = [c[0] for c in op_cursor.description] self.rdsinfo = op_cursor.fetchall()
def __init__(self,*request,**kwargs): super(TableHandler,self).__init__(request[0], request[1]) rpath = request[1].path[1:].replace("/",'_') rdslist = op_cursor.execute(globals()[ rpath + '_sql' ]) self.hide = globals().get( rpath + '_hide' ,[]) self.headers = [c[0] for c in op_cursor.description] self.rdsinfo = op_cursor.fetchall()
def getDatalist(self): datalist = [] op_cursor.execute(globals()[self.rpath + "_data_sql"]) parent_menus = op_cursor.fetchall() head = [c[0] for c in op_cursor.description] for menus in parent_menus: datalist.append(dict(zip(head, menus))) return datalist
def getDatalist(self): datalist = [] op_cursor.execute(globals()[self.rpath + "_data_sql"]) parent_menus = op_cursor.fetchall() head = [c[0] for c in op_cursor.description] for menus in parent_menus: datalist.append(dict(zip(head,menus))) return datalist
def menu_record_tree(self): datalist = [] op_cursor.execute("SELECT menu_id,menu_title FROM `admin_menu` WHERE `parent_id`=0") parent_menus = op_cursor.fetchall() head = [c[0] for c in op_cursor.description] for menus in parent_menus: datalist.append(dict(zip(head,menus))) return datalist
def get_user_list(self): user = op_cursor.execute(globals()[self.request.path[1:].replace("/",'_')+'_sql']) users = op_cursor.fetchall() head = [c[0] for c in op_cursor.description] datalist = [] for user in users: datalist.append(dict(zip(head,user))) return datalist
def menu_record_tree(self): datalist = [] op_cursor.execute( "SELECT menu_id,menu_title FROM `admin_menu` WHERE `parent_id`=0") parent_menus = op_cursor.fetchall() head = [c[0] for c in op_cursor.description] for menus in parent_menus: datalist.append(dict(zip(head, menus))) return datalist
def get_user_list(self): user = op_cursor.execute( globals()[self.request.path[1:].replace("/", '_') + '_sql']) users = op_cursor.fetchall() head = [c[0] for c in op_cursor.description] datalist = [] for user in users: datalist.append(dict(zip(head, user))) return datalist