2022-10-12 14:22:22 +00:00
|
|
|
"""This is my docstring."""
|
2024-03-27 18:05:49 +00:00
|
|
|
|
2022-10-12 14:22:22 +00:00
|
|
|
import os
|
|
|
|
|
|
|
|
from spiffworkflow_backend import create_app
|
2023-05-27 00:01:08 +00:00
|
|
|
from spiffworkflow_backend.services.acceptance_test_fixtures import load_acceptance_test_fixtures
|
2022-10-12 14:22:22 +00:00
|
|
|
|
|
|
|
app = create_app()
|
2023-05-01 15:25:37 +00:00
|
|
|
|
|
|
|
if app.config["SPIFFWORKFLOW_BACKEND_USE_WERKZEUG_MIDDLEWARE_PROXY_FIX"]:
|
2023-05-01 13:38:47 +00:00
|
|
|
from werkzeug.middleware.proxy_fix import ProxyFix
|
2023-05-01 15:25:37 +00:00
|
|
|
|
2023-05-01 13:38:47 +00:00
|
|
|
app.wsgi_app = ProxyFix(app.wsgi_app, x_proto=1)
|
2022-10-12 14:22:22 +00:00
|
|
|
|
|
|
|
# this is in here because when we put it in the create_app function,
|
|
|
|
# it also loaded when we were running migrations, which resulted in a chicken/egg thing.
|
|
|
|
if os.environ.get("SPIFFWORKFLOW_BACKEND_LOAD_FIXTURE_DATA") == "true":
|
|
|
|
with app.app_context():
|
2022-10-12 19:28:52 +00:00
|
|
|
load_acceptance_test_fixtures()
|