mirror of
https://github.com/FAUSheppy/flask-json-dream-website
synced 2025-12-06 08:11:35 +01:00
use new dir structure for /people
This commit is contained in:
@@ -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():
|
||||
|
||||
@@ -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 %}
|
||||
|
||||
Reference in New Issue
Block a user