|
|
@ -1,6 +1,7 @@
|
|
|
|
import os
|
|
|
|
import os
|
|
|
|
from flask import Flask
|
|
|
|
from flask import Flask
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class PrefixMiddleware(object):
|
|
|
|
class PrefixMiddleware(object):
|
|
|
|
|
|
|
|
|
|
|
|
def __init__(self, app, prefix=''):
|
|
|
|
def __init__(self, app, prefix=''):
|
|
|
@ -25,7 +26,6 @@ def create_app(test_config=None):
|
|
|
|
SECRET_KEY='dev',
|
|
|
|
SECRET_KEY='dev',
|
|
|
|
DATABASE=os.path.join(app.instance_path, 'exquisite'),
|
|
|
|
DATABASE=os.path.join(app.instance_path, 'exquisite'),
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if test_config is None:
|
|
|
|
if test_config is None:
|
|
|
|
# load the instance config, if it exists, when not testing
|
|
|
|
# load the instance config, if it exists, when not testing
|
|
|
@ -33,7 +33,7 @@ def create_app(test_config=None):
|
|
|
|
else:
|
|
|
|
else:
|
|
|
|
# load the test config if passed in
|
|
|
|
# load the test config if passed in
|
|
|
|
app.config.from_mapping(test_config)
|
|
|
|
app.config.from_mapping(test_config)
|
|
|
|
|
|
|
|
|
|
|
|
# ensure the instance folder exists
|
|
|
|
# ensure the instance folder exists
|
|
|
|
try:
|
|
|
|
try:
|
|
|
|
os.makedirs(app.instance_path)
|
|
|
|
os.makedirs(app.instance_path)
|
|
|
@ -55,7 +55,6 @@ def create_app(test_config=None):
|
|
|
|
from . import home
|
|
|
|
from . import home
|
|
|
|
app.register_blueprint(home.bp)
|
|
|
|
app.register_blueprint(home.bp)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app.wsgi_app = PrefixMiddleware(app.wsgi_app, prefix='/soupboat/xquisite')
|
|
|
|
app.wsgi_app = PrefixMiddleware(app.wsgi_app, prefix='/soupboat/xquisite')
|
|
|
|
|
|
|
|
|
|
|
|
return app
|
|
|
|
return app
|
|
|
|