Answers for "flask configuration of application"

4

default flask app

from flask import Flask
app = Flask(__name__)

@app.route('/')
def index():
    return 'Flask'
Posted by: Guest on June-13-2020
0

how to access app.config globally in flask app

from flask import current_app

@api.route("/info")
def get_account_num():
    num = current_app.config["INFO"]
Posted by: Guest on June-13-2021

Code answers related to "flask configuration of application"

Python Answers by Framework

Browse Popular Code Answers by Language