Fix dashboard imports for Streamlit multi-page routing
- Add sys.path.insert at top of app.py and all 5 page files - Fix .streamlit/config.toml CORS/XSRF conflict - Remove duplicate st.set_page_config from page files - Verified: all pages import cleanly, dashboard boots via streamlit run - All 49 tests passing (31 original + 18 dashboard)
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import sys; from pathlib import Path; _p = Path(__file__).resolve().parent.parent.parent; str(_p) not in sys.path and sys.path.insert(0, str(_p))
|
||||
"""Page 1 — Matchday Control Room.
|
||||
|
||||
KPI row, fixture difficulty heatmap, start/sit table, bump chart.
|
||||
@@ -59,7 +60,6 @@ def _build_fixture_heatmap(players, fixtures):
|
||||
|
||||
|
||||
def run():
|
||||
st.set_page_config(page_title="Matchday — Fantabeto", page_icon="⚽", layout="wide")
|
||||
inject_css()
|
||||
preds, fixtures, players, lineups, votes = _get_data()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user