I want to do something like this:
app = Flask(__name__)
app.config.from_object(mypackage.config)
app.static_url_path = app.config['PREFIX']+"/static"
when I try:
print app.static_url_path
I get the correct static_url_path
But in my templates when I use url_for('static'), The html file generated using jinja2 still has the default static URL path /static with the missing PREFIX that I added.
If I hardcode the path like this:
app = Flask(__name__, static_url_path='PREFIX/static')
It works fine. What am I doing wrong?