File size: 1,011 Bytes
1f8085b
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
from flask import Blueprint, request, Response, redirect, url_for, jsonify, render_template, make_response, send_from_directory

from werkzeug.security import generate_password_hash

handler = Blueprint('handler',
                    __name__,
                    static_folder='./static',
                    template_folder='./templates')


@handler.route('/', methods=['GET'])
def Handler_Main():
    data = {
        "Name": "Amritananda Sadhukhan",
        "Age": "23",
        "Max_Sugar": "200",
        "Min_Sugar": "100",
        "Heart_Rate": "60"
    }
    return render_template("index.html", data=data)

@handler.route('/profile', methods=['GET'])
def Handler_Profile():
    data = {
        "Name": "Amritananda Sadhukhan",
        "Age": "23",
        "Max_Sugar": "200",
        "Min_Sugar": "100",
        "Heart_Rate": "60"
    }
    return render_template("profile.html", data=data)

  
@handler.route('/offline.html')
def offline():
    return send_from_directory('templates', 'index.html')