If you have any questions, comments or issues with this project please post them here!
“RuntimeError: The session is unavailable because no secret key was set. Set the secret_key on the application to something unique and secret.”
I’ve already set the secret key, what’s wrong?
Hi Admins, I noticed that David’s Solution to the Broken Code (Fix my code) is not working
Can you please check why?
oh ok, I actually found out why…
He’s using
if session["myName"]:
instead of
if session.get("myName"):
What makes the difference here?
Is the course using a database or a list?
2 Likes
.get()
looks for the key. If it doesn’t exist, it returns the second parameter (or None
if it isn’t given)
2 Likes
in this case it is using the replit secrets
1 Like
I’ve always been having an error for logging out, and I don’t know why. Every time I click logout, it keeps sending me back to /hi.