Skip to content

Commit 99a1cdd

Browse files
committed
[add_jinja2_template]
1 parent 60234ad commit 99a1cdd

File tree

2 files changed

+15
-3
lines changed

2 files changed

+15
-3
lines changed

app.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
from flask import Flask
1+
from flask import Flask, render_template
22

33
app = Flask(__name__)
44

55

6-
@app.route("/")
6+
@app.route('/')
77
def hello_world():
8-
return "<b>Hello, World!</b>"
8+
return render_template('index.html')
99

1010

1111
if __name__ == '__main__':

templates/index.html

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<title>
5+
Online Store
6+
</title>
7+
</head>
8+
9+
<body>
10+
<p>Hello, World!</p>
11+
</body>
12+
</html>

0 commit comments

Comments
 (0)