From 9a57140fac8cddc641c5faa2428b06106bd0afbd Mon Sep 17 00:00:00 2001 From: pranjal-joshi Date: Mon, 4 Dec 2023 18:10:23 +0530 Subject: [PATCH] v2.20 - Bugfixes - Clear Cache button random key added --- src/classes/Changelog.py | 4 +++- src/streamlit_app.py | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/classes/Changelog.py b/src/classes/Changelog.py index 0c667aa5..891a3dc9 100644 --- a/src/classes/Changelog.py +++ b/src/classes/Changelog.py @@ -7,7 +7,7 @@ from classes.ColorText import colorText -VERSION = "2.19" +VERSION = "2.20" changelog = colorText.BOLD + '[ChangeLog]\n' + colorText.END + colorText.BLUE + ''' [1.00 - Beta] @@ -285,4 +285,6 @@ [2.19] 1. New Index (Group of Indices) `16 > Sectoral Indices` added +[2.20] +1. Bugfixes - Clear cache button random key added to fix re-rendering issues ''' + colorText.END diff --git a/src/streamlit_app.py b/src/streamlit_app.py index ea52b9b3..c724cca6 100644 --- a/src/streamlit_app.py +++ b/src/streamlit_app.py @@ -1,3 +1,4 @@ +import random import streamlit as st import streamlit.components.v1 as components import requests @@ -51,6 +52,7 @@ def show_df_as_result_table(): clear_cache_btn = cc.button( label='Clear Cached Data', use_container_width=True, + key=random.randint(), ) if clear_cache_btn: os.system('rm stock_data_*.pkl')