def show_devices(self): res=self._cur.execute("select * from devices_table;") namelist=[] for line in res: #print line rowValue = SqlRowProxy(self, 'id', line, self._columns) namelist.append({'device':rowValue.getjsonvalue()}) return namelist
def show_devices(self): res = self._cur.execute("select * from devices_table;") namelist = [] for line in res: #print line rowValue = SqlRowProxy(self, 'id', line, self._columns) namelist.append({'device': rowValue.getjsonvalue()}) return namelist
def show_user(self): try: rows=self._cur.execute("select * from users_table;") rowsvalue = [] if (rows != None): for row in rows: row_value = SqlRowProxy(self, 'username', row) rowsvalue.append(row_value.getjsonvalue()) return rowsvalue except Exception as e: return None, str(e)
def show_user(self): try: rows = self._cur.execute("select * from users_table;") rowsvalue = [] if (rows != None): for row in rows: row_value = SqlRowProxy(self, 'username', row) rowsvalue.append(row_value.getjsonvalue()) return rowsvalue except Exception as e: return None, str(e)