Add user-content page

This commit is contained in:
Chris Wilson
2020-12-04 18:22:12 -05:00
parent 9e0ed8ab5b
commit 18afeed437
4 changed files with 117 additions and 57 deletions

View File

@@ -69,9 +69,14 @@ def uploads():
return redirect(url_for("viewSeed", seed=seed.id))
else:
flash("Not recognized file format. Awaiting a .multidata file.")
return render_template("hostGame.html")
@app.route('/user-content', methods=['GET'])
def user_content():
rooms = select(room for room in Room if room.owner == session["_id"])
seeds = select(seed for seed in Seed if seed.owner == session["_id"])
return render_template("hostGame.html", rooms=rooms, seeds=seeds)
return render_template("userContent.html", rooms=rooms, seeds=seeds)
def allowed_file(filename):