files: reorganize imports, remove print lines
This commit is contained in:
@@ -10,8 +10,9 @@ import hashlib
|
||||
|
||||
from PySide6 import QtCore, QtWidgets
|
||||
|
||||
from src.backend.database import Database
|
||||
from src.backend.admin_console import AdminCommands
|
||||
from src.backend.database import Database
|
||||
|
||||
|
||||
class Ui_Dialog(object):
|
||||
def setupUi(self, Dialog):
|
||||
@@ -64,13 +65,11 @@ class Ui_Dialog(object):
|
||||
def login(self):
|
||||
username = self.lineEdit.text()
|
||||
password = self.lineEdit_2.text()
|
||||
print(type(username), password)
|
||||
# print(type(username), password)
|
||||
# Assuming 'Database' is a class to interact with your database
|
||||
db = Database()
|
||||
db = Database()
|
||||
|
||||
hashed_password = hashlib.sha256(
|
||||
password.encode()
|
||||
).hexdigest()
|
||||
hashed_password = hashlib.sha256(password.encode()).hexdigest()
|
||||
if len(db.getUsers()) == 0:
|
||||
AdminCommands().create_admin()
|
||||
self.lresult = 1 # Indicate successful login
|
||||
|
||||
Reference in New Issue
Block a user