Add URL prefix to login_view

Viewed 128

I am configuring an url prefix for a web the following way:

app = Flask(__name__, static_url_path="/myPrefix", static_folder="static")

Then, I set the flask_login values like this (which are run after the preceeding line of code):

login = LoginManager(app)
login.login_view = 'auth.login'
login.login_message = u"Unregistered user"

When I access a page that required to be logged in, login_view fires. Then the problem arises: even though I set the static_url_path value to the app, and app is passed as a variable to LoginManager, the url_prefix is ignored.

Therefore, my question is: how can I make static_url_path visible to login_view so that it includes this prefix to the login url?

0 Answers
Related