-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp.py
50 lines (44 loc) · 860 Bytes
/
app.py
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
38
39
40
41
42
43
44
45
46
47
48
49
50
from flask import Flask, render_template
app = Flask(__name__)
CARS = [
{
"id": 1,
"make": "Ford",
"model": "Mustang",
"year": 2022,
"price": 35000
},
{
"id": 2,
"make": "Chevrolet",
"model": "Corvette",
"year": 2021,
"price": 65000
},
{
"id": 3,
"make": "BMW",
"model": "M3",
"year": 2020,
"price": 55000
},
{
"id": 4,
"make": "Porsche",
"model": "911",
"year": 2022,
"price": 90000
},
{
"id": 5,
"make": "Tesla",
"model": "Model S",
"year": 2021,
"price": 80000
}
]
@app.route("/")
def hello_world():
return render_template('home.html', cars=CARS)
if __name__ =="__main__":
app.run(host="0.0.0.0", debug=True)