diff --git a/server.py b/server.py index 7f5e571..dd43028 100755 --- a/server.py +++ b/server.py @@ -107,7 +107,7 @@ app = Flask(__name__) def index(): global command 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 @@ -150,6 +150,10 @@ def index(): commodities_settings = json.load(f) f.close() + f = open('csv/indices_settings.json', 'r') + indices_settings = json.load(f) + f.close() + f= open('csv/crypto_settings.json', 'r') crypto_settings = json.load(f) f.close() @@ -227,6 +231,7 @@ def index(): 'not_displaying2': not_displaying2, 'stocks_settings': stocks_settings, 'commodities_settings': commodities_settings, + 'indices_settings': indices_settings, 'crypto_settings': crypto_settings, 'forex_settings': forex_settings, 'current_weather': current_weather, @@ -255,11 +260,11 @@ def save_displaying(input_settings): 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'] professional = len(input_settings) == 2 if professional: - all_settings = ['Stocks', 'Crypto', 'Forex', 'Commodities', 'Current Weather', 'News'] + all_settings = ['Stocks', 'Crypto', 'Forex', 'Commodities', 'Indices', 'Current Weather', 'News'] positions = [] @@ -392,7 +397,7 @@ def save(): input_settings= input_settings['feature_settings'] feature = input_settings['feature'] - if feature in ['Stocks', 'Crypto', 'Forex', 'Commodities']: + if feature in ['Stocks', 'Crypto', 'Forex', 'Commodities', 'Indices']: save_trade_settings(input_settings) elif feature in ['Current Weather', 'Daily Forecast']: save_weather_settings(input_settings)