display api key for weather features

This commit is contained in:
Justin 2022-03-02 22:49:44 +08:00 committed by GitHub
parent 8a46f5d505
commit c7b6cebcdd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -104,7 +104,9 @@ def index():
elif professional:
currently_displaying = json.load(open('csv/display_settings.json', 'r'))[1]
not_displaying = [f for f in all_features if f not in currently_displaying[0] and f not in currently_displaying[1]]
with open('api_keys.txt', 'r') as f:
api_key2 = f.readlines()
now = datetime.datetime.now()
@ -126,6 +128,7 @@ def index():
GIF_settings = json.load(open('csv/GIF_settings.json', 'r'))
message_settings = json.load(open('csv/message_settings.json', 'r'))
general_settings = json.load(open('csv/general_settings.json', 'r'))
api_keys = api_key2[1]
templateData = {
@ -146,7 +149,8 @@ def index():
'GIF_settings':GIF_settings,
'message_settings':message_settings,
'professional':professional,
'general_settings':general_settings
'general_settings':general_settings,
'api_keys':api_keys
}
return render_template('index.html', **templateData)