INNER CODE UNIT · Python
home
tecladocode/web-dev-bootcamp · curriculum/section07/lectures/10_display_past_entries_microblog/end/app.py:11
def home():
if request.method == "POST":
entry_content = request.form.get("content")
formatted_date = datetime.datetime.today().strftime("%Y-%m-%d")
entries.append((entry_content, formatted_date))
return render_template("home.html", entries=entries)