|
@@ -46,13 +46,16 @@ def read_config():
|
|
|
|
|
|
@app.route("/")
|
|
|
def home():
|
|
|
- # TODO: redirect to /default, meglio che render
|
|
|
- return render_template("index.htm", site="default")
|
|
|
+ return 'casella di destinazione non specificata'
|
|
|
|
|
|
|
|
|
@app.route("/<site>")
|
|
|
def site(site):
|
|
|
- return render_template("index.htm", site=site)
|
|
|
+ try:
|
|
|
+ sitedata = read_config()["sites"][site]
|
|
|
+ except KeyError:
|
|
|
+ sitedata = {}
|
|
|
+ return render_template("index.htm", siteid=site, sitedata=sitedata)
|
|
|
|
|
|
|
|
|
@app.route("/upload/<site>", methods=["POST"])
|