Make Whitenoise serve static assets

Currently it’s not configured properly, so isn’t having any effect.
This change makes it wrap the Flask app, so it intercepts any requests
for static content.

Follows the pattern documented in http://whitenoise.evans.io/en/stable/flask.html#enable-whitenoise
This commit is contained in:
Chris Hill-Scott
2018-11-29 10:17:13 +00:00
parent c3cc4f4ded
commit d58c04d974

View File

@@ -12,4 +12,4 @@ STATIC_URL = 'static/'
app = Flask('app')
create_app(app)
application = WhiteNoise(app, STATIC_ROOT, STATIC_URL)
app.wsgi_app = WhiteNoise(app.wsgi_app, STATIC_ROOT, STATIC_URL)