moved rest api instantiation into separate file
This commit is contained in:
10
stand.py
10
stand.py
@ -3,17 +3,17 @@ from st_aggrid import AgGrid
|
||||
|
||||
import hacks
|
||||
|
||||
from restapi import api
|
||||
from restapi import restapi
|
||||
from utils.st_utils import get_session_id, rerun
|
||||
|
||||
|
||||
st.set_page_config(layout="wide")
|
||||
|
||||
|
||||
api.sid = get_session_id() # rest api needs current session ID to trigger the next rerun
|
||||
restapi.sid = get_session_id() # rest api needs current session ID to trigger the next rerun
|
||||
|
||||
changed = api.changed
|
||||
df = api.data
|
||||
changed = restapi.changed
|
||||
df = restapi.data
|
||||
|
||||
|
||||
|
||||
@ -38,7 +38,7 @@ response = AgGrid(
|
||||
|
||||
new_df = response.get("data")#, df)
|
||||
if not new_df.equals(df) and not changed:
|
||||
api.data = new_df
|
||||
restapi.data = new_df
|
||||
# print("old:")
|
||||
# print(df)
|
||||
# print("new:")
|
||||
|
Reference in New Issue
Block a user