Accessing Flask Session variables from Flask Navigation for dynamic navigation menu
I want to have a dynamic navigation menu that shows "Login" if the user is not currently logged on, and "Logout" if the user is logged in. I'm using code similar to the following: import flask import flask_nav import flask_nav.elements as fne frontend = flask.Blueprint('frontend', __name__) application = flask.Flask(__name__) mySess = flask_session.Session() flask_appconfig.AppConfig(application) flask_bootstrap.Bootstrap(application) application.register_blueprint(frontend) application.config['BOOTSTRAP_SERVE_LOCAL'] = True application.config['SSL'] = True application.secret_key = SECRET_KEY