Spieleranzahl Startseite
This commit is contained in:
parent
3b6cf73edb
commit
6f42abfc0d
1 changed files with 10 additions and 0 deletions
10
app/app.py
10
app/app.py
|
|
@ -25,6 +25,12 @@ def start():
|
|||
return redirect("/app/raum/1")
|
||||
|
||||
html = '<h1>Verlies</h1>'
|
||||
|
||||
db = get_db()
|
||||
anzahl = db.execute("SELECT COUNT(*) AS n FROM spielstand").fetchone()
|
||||
html = html + '<p>' + str(anzahl["n"]) + ' Abenteurer waren schon hier.</p>'
|
||||
db.close()
|
||||
|
||||
if "spieler" in session:
|
||||
db = get_db()
|
||||
s = db.execute(
|
||||
|
|
@ -69,6 +75,10 @@ def raum(id):
|
|||
|
||||
html = "<h1>" + r["name"] + "</h1>"
|
||||
html = html + "<p>" + r["beschreibung"] + "</p>"
|
||||
|
||||
if "spieler" in session:
|
||||
html = html + '<p><small>Unterwegs als: ' + session["spieler"] + '</small></p>'
|
||||
|
||||
for a in ausgaenge:
|
||||
html = html + '<a href="/app/raum/' + str(a["nach_raum"]) + '">' \
|
||||
+ a["richtung"] + '</a> '
|
||||
|
|
|
|||
Loading…
Reference in a new issue