Initial commit. Functional draft content - requires further update for automotive speciality.

This commit is contained in:
2025-01-17 05:54:06 +01:00
parent e7231cb67a
commit 2f63d27c5b
2 changed files with 11 additions and 2 deletions

10
app.py
View File

@@ -41,12 +41,20 @@ sys.path.insert(0, os.path.dirname(__file__)) # Todo: why?
app = Flask(__name__)
app.secret_key = os.getenv('KEY_SECRET_FLASK')
# AppConfig(app)
app.config.from_object(app_config) # for db init with required keys
app.app_config = app_config
# app.config["config"] = app_config()
print('sql vars')
print(app.config['DB_PASSWORD'])
print(app.config['DB_USER'])
print(app.config['SQLALCHEMY_DATABASE_URI'])
print(app.config['SECRET_KEY'])
print(os.getenv('KEY_SECRET_FLASK'))
# logging
handler = RotatingFileHandler('app.log', maxBytes=10000, backupCount=3)
handler.setLevel(logging.DEBUG)
@@ -114,4 +122,4 @@ app.register_blueprint(routes_user)
@app.template_filter('console_log')
def console_log(value):
Helper_App.console_log(value)
return value
return value