first steps towards real listings!

feature-admin-split
Darksider3 5 years ago
parent 3915843943
commit f06d4fa945

@ -3,13 +3,24 @@
from lib.sqlitedb import SQLitedb from lib.sqlitedb import SQLitedb
import lib.CFG as CFG import lib.CFG as CFG
class ListUsers:
db = None
usersFetch = None
def __init__(self, ap: bool):
self.db = SQLitedb(CFG.REG_FILE)
if not ap:
query = "SELECT * FROM `applications` WHERE status = '1'"
else:
query = "SELECT * FROM `applications` WHERE status = '0'"
self.usersFetch = self.db.query(query)
print(self.usersFetch)
if __name__ == "__main__": if __name__ == "__main__":
try: try:
SQLitedb(CFG.REG_FILE) L = ListUsers(CFG.args.unapproved)
if CFG.args.unapproved:
print("yes! Only unapproved ones!")
else:
print("Just approved ones")
print("hi") print("hi")
exit(0) exit(0)
except KeyboardInterrupt: except KeyboardInterrupt:

Loading…
Cancel
Save