first request render

main
km0 2 years ago
parent 45b7e6e378
commit 67e52efbd2

@ -63,15 +63,22 @@ def send_image(filename):
@app.route("/update", methods=["GET", "POST"]) @app.route("/update", methods=["GET", "POST"])
def update(): def update():
if request.method == "POST": if request.method == "POST":
print("Rendering the homepage after weebhook request")
pull() pull()
render() render()
return "GET method not supported" return "GET method not supported"
@app.route("/render") @app.route("/render")
def request_render(): def manual_render():
print("Manual rendering the homepage")
render() render()
return redirect(url_for("home")) return redirect(url_for("home"))
@app.before_first_request
def prepare_page():
print("Rendering the homepage")
render()
app.run(port=PORT, debug=DEBUG) app.run(port=PORT, debug=DEBUG)

Loading…
Cancel
Save