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