Пример #1
0
 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()
Пример #2
0
 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()
Пример #3
0
 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
Пример #4
0
 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
Пример #5
0
 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
Пример #6
0
 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
Пример #7
0
 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
Пример #8
0
 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