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