| import time | |
| from flask import Flask, redirect, url_for | |
| app = Flask(__name__) | |
| updates = ["INIT"] | |
| def hello_world(): | |
| update_times = "\n".join([f"<li>{i}</li>" for i in updates]) | |
| return f"<p>Hello, World!</p><hr><h2>UPDATES</h2>{update_times}" | |
| def update(): | |
| current_time = time.ctime() | |
| updates.append(str(current_time)) | |
| return redirect(url_for('hello_world')) | |