From b6e9c914c58d2cc750abd87db9c488b548d203de Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Thu, 13 Sep 2018 01:51:06 +0200 Subject: [PATCH] Add debug notice --- static/nryg.less | 6 ++++++ templates/base.html | 9 +++++++-- webserver.py | 26 +++++++++++++------------- 3 files changed, 26 insertions(+), 15 deletions(-) diff --git a/static/nryg.less b/static/nryg.less index 9be4fc78..47042e5f 100644 --- a/static/nryg.less +++ b/static/nryg.less @@ -789,6 +789,12 @@ nav { } } +#debug-mode { + color: red; + font-weight: bold; + background-color: darkred; +} + #edit-css { font-size: medium; } diff --git a/templates/base.html b/templates/base.html index 988f2f3b..b869cc74 100644 --- a/templates/base.html +++ b/templates/base.html @@ -19,14 +19,19 @@ Home {% if session.get('username') is not none %} - Telegram - Discord + Telegram + Discord Steam /r/RoyalGames {% endif %}
+ {% if config["DEBUG"] %} + + DEBUG + + {% endif %}
', converted_md) return render_template("wikipage.html", key=key, wiki_page=wiki_page, converted_md=Markup(converted_md), - wiki_log=wiki_latest_edit, config=config) + wiki_log=wiki_latest_edit, rygconf=config) elif request.method == "POST": user_id = fl_session.get('user_id') user = db_session.query(db.Royal).filter_by(id=user_id).one() @@ -308,7 +308,7 @@ def page_diario(): db_session = db.Session() diario_entries = db_session.query(db.Diario).order_by(db.Diario.timestamp.desc()).all() db_session.close() - return render_template("diario.html", config=config, entries=diario_entries) + return render_template("diario.html", rygconf=config, entries=diario_entries) if __name__ == "__main__":