todo action handler

This commit is contained in:
Yax 2022-02-18 18:26:17 +01:00
parent ed430799f5
commit 04c2d8f685
2 changed files with 3 additions and 1 deletions

1
run.py
View file

@ -85,6 +85,7 @@ def stacosys_server(config_pathname):
app.config.update(WEB_USERNAME=conf.get(ConfigParameter.WEB_USERNAME)) app.config.update(WEB_USERNAME=conf.get(ConfigParameter.WEB_USERNAME))
app.config.update(WEB_PASSWORD=conf.get(ConfigParameter.WEB_PASSWORD)) app.config.update(WEB_PASSWORD=conf.get(ConfigParameter.WEB_PASSWORD))
app.config.update(MAILER=mailer) app.config.update(MAILER=mailer)
app.config.update(RSS=rss)
logger.info(f"start interfaces {api} {form} {admin}") logger.info(f"start interfaces {api} {form} {admin}")
# start Flask # start Flask

View file

@ -60,6 +60,7 @@ def admin_homepage():
@app.route("/web/admin", methods=["POST"]) @app.route("/web/admin", methods=["POST"])
def admin_action(): def admin_action():
flash(request.form.get("comment") + " " + request.form.get("action")) flash(request.form.get("comment") + " " + request.form.get("action"))
# TODO process action
# rebuild RSS # rebuild RSS
#rss.generate() app.config.get("RSS").generate()
return redirect('/web/admin') return redirect('/web/admin')