use new dir structure for /people

This commit is contained in:
2020-07-28 01:48:52 +02:00
parent 5ead5fb292
commit 7e86039e87
2 changed files with 4 additions and 3 deletions

View File

@@ -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():

View File

@@ -22,7 +22,7 @@
</div>
<div class="col image-min-dimensions">
<img class="img-responsive w-100 image-max-dimensions"
src="/pictures/{{ p['image'] }}"></img>
src="{{ p['image'] }}"></img>
</div>
</div>
{% endfor %}