Flask is a micro web development framework for Python. It relies on the Jinja2 template engine and the Werkzeug WSGI toolkit.
[New project] ▶ ︎ [Python / Web] ▶ ︎ [Flask Web Projet] Select to create a project
[Project] ▶ ︎ [template] ▶ ︎ [Right click / Add] Create empty HTML with
test.html
<!DOCTYPE html>
<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8" />
<title>Hello</title>
</head>
<body>
Hello World
</body>
</html>
Comment out home () in view.py and write it to load the new test.html (newly created HTML).
view.py
def home():
return render_template('test.html')
"""
def home():
return render_template(
'index.html',
title='Home Page',
year=datetime.now().year,
)
"""
[Project / Right click] ▶ ︎ [Public]
Decide a new arbitrary name in the Web App name and App Service plan items
Check here only! Issued unless otherwise changed
Finally, check the app created on Azure. [App Service] ▶ ︎ [APP name] ▶ ︎ [Overview] Click the URL to open it!
Recommended Posts