Initial commit. Functional draft content - requires further update for automotive speciality.
This commit is contained in:
10
app.py
10
app.py
@@ -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
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
|
||||
flask
|
||||
Flask==3.0.3
|
||||
gunicorn==23.0.0
|
||||
flask_wtf
|
||||
flask_sqlalchemy
|
||||
flask_cors
|
||||
|
||||
Reference in New Issue
Block a user