mirror of
https://github.com/FAUSheppy/flask-json-dream-website
synced 2025-12-07 00:31:34 +01:00
load pictures from content dir
This commit is contained in:
@@ -207,7 +207,7 @@ def sendStatic(path):
|
|||||||
@app.route("/picture/<path:path>")
|
@app.route("/picture/<path:path>")
|
||||||
def sendPicture(path):
|
def sendPicture(path):
|
||||||
cache_timeout = 2592000
|
cache_timeout = 2592000
|
||||||
return flask.send_from_directory(PICTURES_DIR, path, cache_timeout=cache_timeout)
|
return flask.send_from_directory(app.config["PICTURES_DIR"], path, cache_timeout=cache_timeout)
|
||||||
|
|
||||||
@app.route('/defaultFavicon.ico')
|
@app.route('/defaultFavicon.ico')
|
||||||
def icon():
|
def icon():
|
||||||
@@ -273,6 +273,7 @@ def init():
|
|||||||
app.config["SECTIONS_DIR"] = os.path.join(app.config["CONTENT_DIR"], SECTIONS_DIR)
|
app.config["SECTIONS_DIR"] = os.path.join(app.config["CONTENT_DIR"], SECTIONS_DIR)
|
||||||
app.config["NEWS_DIR"] = os.path.join(app.config["CONTENT_DIR"], NEWS_DIR)
|
app.config["NEWS_DIR"] = os.path.join(app.config["CONTENT_DIR"], NEWS_DIR)
|
||||||
app.config["MAIN_LINKS_DIR"] = os.path.join(app.config["CONTENT_DIR"], MAIN_LINKS_DIR)
|
app.config["MAIN_LINKS_DIR"] = os.path.join(app.config["CONTENT_DIR"], MAIN_LINKS_DIR)
|
||||||
|
app.config["PICTURES_DIR"] = os.path.join(app.config["CONTENT_DIR"], PICTURES_DIR)
|
||||||
|
|
||||||
if app.config["RELOAD_CALENDAR_ON_START"]:
|
if app.config["RELOAD_CALENDAR_ON_START"]:
|
||||||
updateEventsFromCalDav()
|
updateEventsFromCalDav()
|
||||||
|
|||||||
Reference in New Issue
Block a user