From e0428bb87b8d7781f0e4019e36a1476e1376cf76 Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Sat, 8 Sep 2018 02:08:05 +0200 Subject: [PATCH] Aggiunta pagina principale per le wiki --- templates/wikihome.html | 25 +++++++++++++++++++++++++ webserver.py | 8 ++++++++ 2 files changed, 33 insertions(+) create mode 100644 templates/wikihome.html diff --git a/templates/wikihome.html b/templates/wikihome.html new file mode 100644 index 00000000..1c3a5ffe --- /dev/null +++ b/templates/wikihome.html @@ -0,0 +1,25 @@ +{% extends 'base.html' %} + +{% block pagetitle %} + Elenco delle Wiki +{% endblock %} + +{% block body %} +

+ Royal Wiki +

+
+
+
+ Pagine Wiki +
+
+ +
+
+
+{% endblock %} \ No newline at end of file diff --git a/webserver.py b/webserver.py index 47f14c3a..4ef82fef 100644 --- a/webserver.py +++ b/webserver.py @@ -228,6 +228,14 @@ def page_game(name: str): return render_template("game.html", minis=query, game_name=game_name, game_short_name=name, config=config) +@app.route("/wiki") +def page_wikihome(): + db_session = db.Session() + wiki_pages = db_session.query(db.WikiEntry).order_by(db.WikiEntry.key).all() + db_session.close() + return render_template("wikihome.html", wiki_pages=wiki_pages, config=config) + + @app.route("/wiki/", methods=["GET", "POST"]) def page_wiki(key: str): db_session = db.Session()