making the ui nicer
This commit is contained in:
17
app.py
17
app.py
@@ -1,11 +1,22 @@
|
||||
#!/usr/bin/python3
|
||||
|
||||
from main import *
|
||||
from flask import Flask, render_template
|
||||
from flask import Flask, render_template, redirect, request
|
||||
|
||||
app = Flask(__name__)
|
||||
|
||||
@app.route('/')
|
||||
def index():
|
||||
sheets = returnSheets('test')
|
||||
return render_template("sheet.html", sheets=sheets)
|
||||
return render_template("index.html")
|
||||
|
||||
@app.route('/party', methods = ["GET","POST"])
|
||||
def party():
|
||||
if request.method == "GET":
|
||||
count = request.args.get("count", default=4, type=int)
|
||||
adv_party = returnParty(count)
|
||||
return render_template("party_sheet.html", adv_party=adv_party, count=count)
|
||||
|
||||
@app.route('/character')
|
||||
def characters():
|
||||
adv_party = returnParty(1)
|
||||
return render_template("party_sheet.html", adv_party=adv_party)
|
||||
|
||||
Reference in New Issue
Block a user