From 7e86039e87a39772119995fd36bcadec736160d1 Mon Sep 17 00:00:00 2001 From: Yannik Schmidt Date: Tue, 28 Jul 2020 01:48:52 +0200 Subject: [PATCH] use new dir structure for /people --- server.py | 5 +++-- templates/people.html | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/server.py b/server.py index ebdfcd6..e5a0cbc 100755 --- a/server.py +++ b/server.py @@ -20,6 +20,7 @@ SECTIONS_DIR = "sections/" NEWS_DIR = "news/" PICTURES_DIR = "pictures/" MAIN_LINKS_DIR = "mainLinks/" +PEOPLE_DIR = "people/" CACHE_FILE = "cache.json" # json config keys @@ -156,8 +157,8 @@ def impressum(): @app.route("/people") def people(): - return flask.render_template("people.html", conf=app.config, - people=readJsonDir("people/")) + peopleDict = readJsonDir(os.path.join(app.config["CONTENT_DIR"], PEOPLE_DIR)) + return flask.render_template("people.html", conf=app.config, people=peopleDict) @app.route("/content/") def content(): diff --git a/templates/people.html b/templates/people.html index 50f9111..967d2e8 100644 --- a/templates/people.html +++ b/templates/people.html @@ -22,7 +22,7 @@
+ src="{{ p['image'] }}">
{% endfor %}