From 81fcf0c7f83c2af9e76ed01676e73bca9443891a Mon Sep 17 00:00:00 2001 From: Anton Kamalov Date: Tue, 22 Oct 2024 23:20:06 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9A=D0=BE=D1=80=D1=80=D0=B5=D0=BA=D1=82?= =?UTF-8?q?=D0=B8=D1=80=D0=BE=D0=B2=D0=BA=D0=B0=20=D0=BF=D1=83=D1=82=D0=B8?= =?UTF-8?q?=20=D0=B4=D0=BB=D1=8F=20=D0=BF=D0=BE=D0=B4=D0=BA=D0=BB=D1=8E?= =?UTF-8?q?=D1=87=D0=B5=D0=BD=D0=B8=D1=8F=20auth-=D0=B1=D0=BB=D1=8E=D0=BF?= =?UTF-8?q?=D1=80=D0=B8=D0=BD=D1=82=D0=B0=20=D0=BA=20=D0=91=D0=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App/Auth/auth.py | 7 ++++--- App/Auth/config.json | 7 ------- 2 files changed, 4 insertions(+), 10 deletions(-) delete mode 100644 App/Auth/config.json diff --git a/App/Auth/auth.py b/App/Auth/auth.py index 01bc734..8178aec 100644 --- a/App/Auth/auth.py +++ b/App/Auth/auth.py @@ -1,13 +1,14 @@ from flask import request, Blueprint, render_template, session, redirect, url_for -from os import path +import os from .auth_route import route from Database.sql_provider import SQLProvider import json -sql_provider = SQLProvider(path.join(path.dirname(__file__), 'sql')) +sql_provider = SQLProvider(os.path.join(os.path.dirname(__file__), 'sql')) auth_bp = Blueprint('auth_bp', __name__, template_folder='templates') +db_config_path = os.path.join(os.path.dirname(__file__), os.pardir, 'Database/config.json') -with open(path.join(path.dirname(__file__), 'config.json')) as f: +with open(db_config_path) as f: config = json.load(f) @auth_bp.route('/', methods=['GET', 'POST']) diff --git a/App/Auth/config.json b/App/Auth/config.json deleted file mode 100644 index 75428e2..0000000 --- a/App/Auth/config.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "host": "localhost", - "port": 3306, - "user": "manager", - "password": "ilikepizza", - "db": "sklad" -} \ No newline at end of file