remove wsgi.py - always serve with whitenoise

We're now running our app as a wsgi app locally, so don't need to
distinguish between the two processes by having wsgi and application.py
whitenoise just serves static files nicely - we don't lose anything
by doing that locally.
This commit is contained in:
Leo Hemsted
2017-11-07 11:50:13 +00:00
parent 0535702707
commit 2cd77e628e
5 changed files with 11 additions and 33 deletions

View File

@@ -1,6 +1,15 @@
import os
from flask import Flask
from whitenoise import WhiteNoise
from app import create_app
PROJECT_ROOT = os.path.dirname(os.path.abspath(__file__))
STATIC_ROOT = os.path.join(PROJECT_ROOT, 'app', 'static')
STATIC_URL = 'static/'
app = Flask('app')
create_app(app)
application = WhiteNoise(app, STATIC_ROOT, STATIC_URL)