I am creating a Flask application on Heroku. Everything worked fine until I added static files. I use this:
from werkzeug import SharedDataMiddleware app = Flask(__name__) app.wsgi_app = SharedDataMiddleware(app.wsgi_app, {'/static': os.path.join(os.path.dirname(__file__), 'static') })
When you deploy the application for the first time, the corresponding files in. / static will be available at herokuapp.com/static. But after this initial deployment, the files never change on Heroku. If I changed the last line to:
app.wsgi_app = SharedDataMiddleware(app.wsgi_app, {'/assets': os.path.join(os.path.dirname(__file__), 'static') })
new url for static files, herokuapp.com/assets, then I can see the updated files.
It seems that the file mirror is stuck in the system. I changed it four times and can still access all the urls.
source share