adding indices
This commit is contained in:
parent
011a308900
commit
9a895a394e
13
server.py
13
server.py
@ -107,7 +107,7 @@ app = Flask(__name__)
|
|||||||
def index():
|
def index():
|
||||||
global command
|
global command
|
||||||
all_features = ['Current Weather','Daily Forecast','News', 'Sports (Upcoming Games)','Sports (Past Games)','Sports (Live Games)',
|
all_features = ['Current Weather','Daily Forecast','News', 'Sports (Upcoming Games)','Sports (Past Games)','Sports (Live Games)',
|
||||||
'Sports (Team Stats)','Custom Images', 'Custom GIFs', 'Custom Messages', 'Stocks', 'Crypto', 'Forex', 'Commodities']
|
'Sports (Team Stats)','Custom Images', 'Custom GIFs', 'Custom Messages', 'Stocks', 'Crypto', 'Forex', 'Commodities', 'Indices']
|
||||||
|
|
||||||
global professional
|
global professional
|
||||||
|
|
||||||
@ -150,6 +150,10 @@ def index():
|
|||||||
commodities_settings = json.load(f)
|
commodities_settings = json.load(f)
|
||||||
f.close()
|
f.close()
|
||||||
|
|
||||||
|
f = open('csv/indices_settings.json', 'r')
|
||||||
|
indices_settings = json.load(f)
|
||||||
|
f.close()
|
||||||
|
|
||||||
f= open('csv/crypto_settings.json', 'r')
|
f= open('csv/crypto_settings.json', 'r')
|
||||||
crypto_settings = json.load(f)
|
crypto_settings = json.load(f)
|
||||||
f.close()
|
f.close()
|
||||||
@ -227,6 +231,7 @@ def index():
|
|||||||
'not_displaying2': not_displaying2,
|
'not_displaying2': not_displaying2,
|
||||||
'stocks_settings': stocks_settings,
|
'stocks_settings': stocks_settings,
|
||||||
'commodities_settings': commodities_settings,
|
'commodities_settings': commodities_settings,
|
||||||
|
'indices_settings': indices_settings,
|
||||||
'crypto_settings': crypto_settings,
|
'crypto_settings': crypto_settings,
|
||||||
'forex_settings': forex_settings,
|
'forex_settings': forex_settings,
|
||||||
'current_weather': current_weather,
|
'current_weather': current_weather,
|
||||||
@ -255,11 +260,11 @@ def save_displaying(input_settings):
|
|||||||
|
|
||||||
global professional
|
global professional
|
||||||
|
|
||||||
all_settings = ['Stocks', 'Crypto', 'Forex', 'Commodities', 'Current Weather', 'Daily Forecast', 'News', 'Sports (Upcoming Games)', 'Sports (Past Games)',
|
all_settings = ['Stocks', 'Crypto', 'Forex', 'Commodities', 'Indices', 'Current Weather', 'Daily Forecast', 'News', 'Sports (Upcoming Games)', 'Sports (Past Games)',
|
||||||
'Sports (Live Games)', 'Sports (Team Stats)', 'Custom Images', 'Custom GIFs', 'Custom Messages']
|
'Sports (Live Games)', 'Sports (Team Stats)', 'Custom Images', 'Custom GIFs', 'Custom Messages']
|
||||||
professional = len(input_settings) == 2
|
professional = len(input_settings) == 2
|
||||||
if professional:
|
if professional:
|
||||||
all_settings = ['Stocks', 'Crypto', 'Forex', 'Commodities', 'Current Weather', 'News']
|
all_settings = ['Stocks', 'Crypto', 'Forex', 'Commodities', 'Indices', 'Current Weather', 'News']
|
||||||
|
|
||||||
|
|
||||||
positions = []
|
positions = []
|
||||||
@ -392,7 +397,7 @@ def save():
|
|||||||
input_settings= input_settings['feature_settings']
|
input_settings= input_settings['feature_settings']
|
||||||
|
|
||||||
feature = input_settings['feature']
|
feature = input_settings['feature']
|
||||||
if feature in ['Stocks', 'Crypto', 'Forex', 'Commodities']:
|
if feature in ['Stocks', 'Crypto', 'Forex', 'Commodities', 'Indices']:
|
||||||
save_trade_settings(input_settings)
|
save_trade_settings(input_settings)
|
||||||
elif feature in ['Current Weather', 'Daily Forecast']:
|
elif feature in ['Current Weather', 'Daily Forecast']:
|
||||||
save_weather_settings(input_settings)
|
save_weather_settings(input_settings)
|
||||||
|
Loading…
Reference in New Issue
Block a user