|
|
@ -16,6 +16,9 @@ class ListUsers:
|
|
|
|
query = "SELECT * FROM `applications` WHERE status = '0'"
|
|
|
|
query = "SELECT * FROM `applications` WHERE status = '0'"
|
|
|
|
self.usersFetch = self.db.query(query)
|
|
|
|
self.usersFetch = self.db.query(query)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def prettyPrint(self):
|
|
|
|
|
|
|
|
pass # see below why not implemented yet, texttable...
|
|
|
|
|
|
|
|
|
|
|
|
def getFetch(self):
|
|
|
|
def getFetch(self):
|
|
|
|
return self.usersFetch
|
|
|
|
return self.usersFetch
|
|
|
|
|
|
|
|
|
|
|
@ -41,9 +44,16 @@ print(t.draw())
|
|
|
|
| Bob | 19 |
|
|
|
|
| Bob | 19 |
|
|
|
|
+-------+-----+
|
|
|
|
+-------+-----+
|
|
|
|
|
|
|
|
|
|
|
|
"""
|
|
|
|
|
|
|
|
for user in fetch:
|
|
|
|
for user in fetch:
|
|
|
|
print("ID: {}; Username: \"{}\"; Mail: <{}>; Name: \"{}\"; Registered: {}; Status: {}".format(
|
|
|
|
print("ID: {}; Username: \"{}\"; Mail: {}; Name: \"{}\"; Registered: {}; Status: {}".format(
|
|
|
|
|
|
|
|
user["id"], user["username"], user["email"], user["name"], user["timestamp"], user["status"]
|
|
|
|
|
|
|
|
))"""
|
|
|
|
|
|
|
|
print("ID %-1s| Username %-5s| Mail %-20s| Name %-17s| Registered %-8s| State |" % (
|
|
|
|
|
|
|
|
" ", " ", " ", " ", " "
|
|
|
|
|
|
|
|
))
|
|
|
|
|
|
|
|
print(101*"-")
|
|
|
|
|
|
|
|
for user in fetch:
|
|
|
|
|
|
|
|
print("%-4i| %-14s| %-25s| %-22s| %-8s| %-6i|" % (
|
|
|
|
user["id"], user["username"], user["email"], user["name"], user["timestamp"], user["status"]
|
|
|
|
user["id"], user["username"], user["email"], user["name"], user["timestamp"], user["status"]
|
|
|
|
))
|
|
|
|
))
|
|
|
|
exit(0)
|
|
|
|
exit(0)
|
|
|
|