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/"
|
NEWS_DIR = "news/"
|
||||||
PICTURES_DIR = "pictures/"
|
PICTURES_DIR = "pictures/"
|
||||||
MAIN_LINKS_DIR = "mainLinks/"
|
MAIN_LINKS_DIR = "mainLinks/"
|
||||||
|
PEOPLE_DIR = "people/"
|
||||||
CACHE_FILE = "cache.json"
|
CACHE_FILE = "cache.json"
|
||||||
|
|
||||||
# json config keys
|
# json config keys
|
||||||
@@ -156,8 +157,8 @@ def impressum():
|
|||||||
|
|
||||||
@app.route("/people")
|
@app.route("/people")
|
||||||
def people():
|
def people():
|
||||||
return flask.render_template("people.html", conf=app.config,
|
peopleDict = readJsonDir(os.path.join(app.config["CONTENT_DIR"], PEOPLE_DIR))
|
||||||
people=readJsonDir("people/"))
|
return flask.render_template("people.html", conf=app.config, people=peopleDict)
|
||||||
|
|
||||||
@app.route("/content/")
|
@app.route("/content/")
|
||||||
def content():
|
def content():
|
||||||
|
|||||||
@@ -22,7 +22,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="col image-min-dimensions">
|
<div class="col image-min-dimensions">
|
||||||
<img class="img-responsive w-100 image-max-dimensions"
|
<img class="img-responsive w-100 image-max-dimensions"
|
||||||
src="/pictures/{{ p['image'] }}"></img>
|
src="{{ p['image'] }}"></img>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|||||||
Reference in New Issue
Block a user