renamed ClearMessage to better name of ClearStatus, and exposed it to jinja2 so status messages now work in base.html
This commit is contained in:
6
main.py
6
main.py
@@ -26,6 +26,12 @@ db = SQLAlchemy(app)
|
||||
ma = Marshmallow(app)
|
||||
Bootstrap(app)
|
||||
|
||||
|
||||
####################################### GLOBALS #######################################
|
||||
# allow jinja2 to call these python functions directly
|
||||
app.jinja_env.globals['ClearStatus'] = st.ClearStatus
|
||||
|
||||
|
||||
@app.route("/test", methods=["GET"])
|
||||
def test():
|
||||
return render_template("base.html", alert=st.GetAlert(), message=st.GetMessage())
|
||||
|
||||
Reference in New Issue
Block a user