Jon Solow
commited on
Commit
·
6947348
1
Parent(s):
6502450
Set top players to default to current week
Browse files
src/pages/12_Top_Players.py
CHANGED
@@ -4,6 +4,7 @@ from config import DEFAULT_ICON
|
|
4 |
from shared_page import common_page_config
|
5 |
|
6 |
from load_options import load_options
|
|
|
7 |
from format_player_html import get_all_position_week_html_str
|
8 |
|
9 |
|
@@ -15,7 +16,9 @@ def get_page():
|
|
15 |
|
16 |
all_options = load_options()
|
17 |
|
18 |
-
|
|
|
|
|
19 |
for pos in ["QB", "RB", "WR", "TE", "K", "DEF"]:
|
20 |
st.header(pos)
|
21 |
week_pos_list = all_options[pos][week]
|
|
|
4 |
from shared_page import common_page_config
|
5 |
|
6 |
from load_options import load_options
|
7 |
+
from domain.playoffs import CURRENT_PLAYOFF_WEEK
|
8 |
from format_player_html import get_all_position_week_html_str
|
9 |
|
10 |
|
|
|
16 |
|
17 |
all_options = load_options()
|
18 |
|
19 |
+
weeks = [1, 2, 3, 4]
|
20 |
+
current_week_index = weeks.index(CURRENT_PLAYOFF_WEEK)
|
21 |
+
week = st.selectbox("Select Week", weeks, index=current_week_index)
|
22 |
for pos in ["QB", "RB", "WR", "TE", "K", "DEF"]:
|
23 |
st.header(pos)
|
24 |
week_pos_list = all_options[pos][week]
|