mirror of
https://github.com/RYGhub/song.git
synced 2024-11-21 12:34:21 +00:00
Make all the sessions permanent
This commit is contained in:
parent
b19d8e8a73
commit
b34678ca07
1 changed files with 2 additions and 0 deletions
|
@ -26,6 +26,7 @@ def page_main():
|
|||
else:
|
||||
done = False
|
||||
session["last_entry"] = None
|
||||
session.permanent = True
|
||||
last_words = db.engine.execute("SELECT * FROM song ORDER BY time").fetchall()
|
||||
return render_template("song.html", last_words=last_words, done=done)
|
||||
elif request.method == "POST":
|
||||
|
@ -35,6 +36,7 @@ def page_main():
|
|||
db.session.add(new_word)
|
||||
db.session.commit()
|
||||
session["last_entry"] = dt.datetime.now()
|
||||
session.permanent = True
|
||||
return redirect(url_for("page_main"))
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue