From c9f8dc72200e430d64a1f0ce598364a5a5678b8c Mon Sep 17 00:00:00 2001 From: Petr Šmerkl <46304018+SveterCZE@users.noreply.github.com> Date: Sat, 19 Nov 2022 18:11:13 +0100 Subject: remove sensitive properties to a hidden file --- .gitignore | 3 ++- app.py | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 6b32c79..ba855d5 100644 --- a/.gitignore +++ b/.gitignore @@ -17,4 +17,5 @@ __pycache__/db_creation.cpython-38.pyc __pycache__/download_files.cpython-38.pyc __pycache__/update_db.cpython-38.pyc key_gen.py -__pycache__/* \ No newline at end of file +__pycache__/* +config_data.py diff --git a/app.py b/app.py index fa47203..e8ac2f7 100644 --- a/app.py +++ b/app.py @@ -10,12 +10,13 @@ Created on Sun Jan 17 09:38:19 2021 from flask import Flask # from flask_debugtoolbar import DebugToolbarExtension from flask_sqlalchemy import SQLAlchemy +from config_data import secret_key, db_address app = Flask(__name__) -app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///justice.db' +app.config['SQLALCHEMY_DATABASE_URI'] = db_address app.config["SQLALCHEMY_ECHO"] = False app.debug = False # HIDE THIS BEFORE DEPLOYING TO PRODUCTION :) -app.secret_key = "123456" +app.secret_key = secret_key # toolbar = DebugToolbarExtension(app) db = SQLAlchemy(app) \ No newline at end of file -- cgit