base commit
This commit is contained in:
parent
981d3de335
commit
2bfd2f83d2
1
.gitignore
vendored
1
.gitignore
vendored
@ -129,3 +129,4 @@ dmypy.json
|
|||||||
# Pyre type checker
|
# Pyre type checker
|
||||||
.pyre/
|
.pyre/
|
||||||
|
|
||||||
|
.idea/
|
21
poc.py
Normal file
21
poc.py
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
import json
|
||||||
|
from flask import Flask, render_template
|
||||||
|
|
||||||
|
app = Flask(__name__)
|
||||||
|
|
||||||
|
with open('steam.json') as file:
|
||||||
|
blob = json.load(file)
|
||||||
|
|
||||||
|
def getfirstgamename():
|
||||||
|
return blob[0]
|
||||||
|
|
||||||
|
|
||||||
|
@app.route('/')
|
||||||
|
def root():
|
||||||
|
return render_template('root.html', gfgn=getfirstgamename())
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
app.run('0.0.0.0', port=5001, debug=True)
|
541302
steam.json
Normal file
541302
steam.json
Normal file
File diff suppressed because it is too large
Load Diff
10
templates/root.html
Normal file
10
templates/root.html
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>Root</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<h1>Hello!</h1>
|
||||||
|
<p>Eerste game in de json blob is <b>{{ gfgn['name'] }}</b> met de game id <b>{{ gfgn['appid'] }}</b></p>
|
||||||
|
</body>
|
||||||
|
|
||||||
|
</html>
|
Reference in New Issue
Block a user