Saturday, October 14, 2023

Add Global Jinja Variables for Quart/Flask

app = Quart(__name__, template_folder='templates', static_folder='static')
app.jinja_env.globals['emojiflags'] = emojiflags 

 or

app = Flask(__name__, template_folder='templates', static_folder='static')
app.add_template_global(name='emojiflags', f=emojiflags