Skip to content

Commit

Permalink
v2.20 - Bugfixes - Clear Cache button random key added
Browse files Browse the repository at this point in the history
  • Loading branch information
pranjal-joshi committed Dec 5, 2023
1 parent 67ed922 commit b74030b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/classes/Changelog.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down Expand Up @@ -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
4 changes: 3 additions & 1 deletion src/streamlit_app.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import random
import streamlit as st
import streamlit.components.v1 as components
import requests
Expand Down Expand Up @@ -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(1,999999999),
)
if clear_cache_btn:
os.system('rm stock_data_*.pkl')
Expand All @@ -63,7 +65,7 @@ def show_df_as_result_table():
type='secondary',
use_container_width=True
)
if int(execute_inputs[0]) < 15:
if type(execute_inputs[0]) == str or int(execute_inputs[0]) < 15:
df.index = df.index.map(lambda x: "https://in.tradingview.com/chart?symbol=NSE%3A" + x)
df.index = df.index.map(lambda x: f'<a href="{x}" target="_blank">{x.split("%3A")[-1]}</a>')
elif execute_inputs[0] == '16':
Expand Down

0 comments on commit b74030b

Please sign in to comment.