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