Advertisement
Guest User

Untitled

a guest
Feb 8th, 2019
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. def index():
  2. json_file = str(os.getcwd()) + "\\static\\data.json"
  3. with open(json_file, 'r+') as file:
  4. json_data = json.load(file)
  5.  
  6. return render_template('test.html', name="Hot Rack", json_data=json_data, days_of_week = json_data.keys(), return_day_value = day_values())
  7.  
  8. def day_values(day):
  9. return json_data[day]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement