forked from 2percentsilk/python-quickstart
- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp.py
More file actions
Latest commit
15 lines (11 loc) · 315 Bytes
/
Copy pathapp.py
File metadata and controls
15 lines (11 loc) · 315 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
fromflaskimportFlask
fromflaskimportrender_template
importjson
app=Flask(__name__)
@app.route("/")
defindex():
withopen('data/products.json') asf:
data=json.load(f)
returnrender_template('index.html', products=data)
if__name__=="__main__":
app.run(debug=True)