Skip to content
Snippets Groups Projects
Commit 109b912e authored by Benjamin Bertrand's avatar Benjamin Bertrand
Browse files

Fix WhiteNoise static directory

- flask-bootstrap dependency removed a while ago
- the full static directory shall be passed

JIRA INFRA-683
parent 58082763
No related branches found
No related tags found
No related merge requests found
...@@ -154,11 +154,7 @@ def create_app(config=None): ...@@ -154,11 +154,7 @@ def create_app(config=None):
app.register_blueprint(network_api, url_prefix="/api/v1/network") app.register_blueprint(network_api, url_prefix="/api/v1/network")
app.register_blueprint(rq_dashboard.blueprint, url_prefix="/rq") app.register_blueprint(rq_dashboard.blueprint, url_prefix="/rq")
app.wsgi_app = WhiteNoise(app.wsgi_app, root="static/") app.wsgi_app = WhiteNoise(app.wsgi_app, root=app.config["CSENTRY_STATIC_DIR"])
app.wsgi_app.add_files(
root="/opt/conda/envs/csentry/lib/python3.6/site-packages/flask_bootstrap/static/",
prefix="bootstrap/",
)
register_cli(app) register_cli(app)
......
...@@ -111,4 +111,5 @@ SENTRY_USER_ATTRS = ["username"] ...@@ -111,4 +111,5 @@ SENTRY_USER_ATTRS = ["username"]
SENTRY_CONFIG = {"release": CSENTRY_RELEASE} SENTRY_CONFIG = {"release": CSENTRY_RELEASE}
# Static local files # Static local files
CSENTRY_STATIC_FILES = Path(__file__).parent / "static" / "files" CSENTRY_STATIC_DIR = Path(__file__).parent / "static"
CSENTRY_STATIC_FILES = CSENTRY_STATIC_DIR / "files"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment