diff --git a/.gitignore b/.gitignore index ff2b1a2..827f2e7 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ recticel/ -py_app/recticel/ +.venv/ +py_app/app/_pycache_/ \ No newline at end of file diff --git a/py_app/app/__pycache__/routes.cpython-312.pyc b/py_app/app/__pycache__/routes.cpython-312.pyc index a608129..0604142 100644 Binary files a/py_app/app/__pycache__/routes.cpython-312.pyc and b/py_app/app/__pycache__/routes.cpython-312.pyc differ diff --git a/py_app/app/routes.py b/py_app/app/routes.py index 93ce422..126f035 100644 --- a/py_app/app/routes.py +++ b/py_app/app/routes.py @@ -98,16 +98,7 @@ def scan(): date = request.form.get('date') time = request.form.get('time') - # Print the values to the terminal for debugging with single quotes - print("Values to be inserted:") - print(f"Operator Code: '{operator_code}'") - print(f"CP Code: '{cp_code}'") - print(f"OC1 Code: '{oc1_code}'") - print(f"OC2 Code: '{oc2_code}'") - print(f"Defect Code: '{defect_code}'") - print(f"Date: '{date}'") - print(f"Time: '{time}'") - + try: # Connect to the database conn = get_db_connection() @@ -137,7 +128,7 @@ def scan(): conn = get_db_connection() cursor = conn.cursor() cursor.execute(""" - SELECT Id, operator_code, CP_full_code, OC1_code, OC2_code, quality_code, date, time, approved_quantity, rejected_quantity + SELECT Id, operator_code, CP_base_code, OC1_code, OC2_code, quality_code, date, time, approved_quantity, rejected_quantity FROM scan1_orders ORDER BY Id DESC LIMIT 15 diff --git a/py_app/requirements.txt b/py_app/requirements.txt index 509cd29..ca93b96 100644 --- a/py_app/requirements.txt +++ b/py_app/requirements.txt @@ -3,4 +3,5 @@ Flask-SSLify Werkzeug gunicorn flask-sqlalchemy -pyodbc \ No newline at end of file +pyodbc +mariadb \ No newline at end of file diff --git a/to_do.txt b/to_do.txt index c692dda..caf76f5 100644 --- a/to_do.txt +++ b/to_do.txt @@ -2,9 +2,12 @@ python3 -m venv recticel source recticel/bin/activate python /home/ske087/quality_recticel/py_app/run.py +sudo apt install mariadb-server mariadb-client +sudo apt-get install libmariadb-dev libmariadb-dev-compat + sudo mysql -u root -p - root password : Initaial01! + root password : Initaial01! acasa Matei@123 CREATE DATABASE trasabilitate_database; CREATE USER 'trasabilitate'@'localhost' IDENTIFIED BY 'Initial01!';