main.py 357 B

1234567891011
  1. from app import app
  2. from flask import jsonify, request, render_template
  3. @app.route('/google-charts/pie-chart')
  4. def google_pie_chart():
  5. data = {'Task' : 'Hours per Day', 'Work' : 11, 'Eat' : 2, 'Commute' : 2, 'Watching TV' : 2, 'Sleeping' : 7}
  6. #print(data)
  7. return render_template('pie-chart.html', data=data)
  8. if __name__ == "__main__":
  9. app.run()