Skip to content
Sign upLog in
← Back to Community

Application Gives 500 Error

Profile icon
CosmicBear

I'm trying to make a login system for my game, but it's not working. I have it checking for session["log"] which should be True if the user is logged in. This is the code to make it default False:

@app.before_first_request def reset_login_info(): session["user"] = "five-nine" session["log"] = False

However, my website returns an error. How can i make it not return an error? I can't use before_request because then it would be in an endless loop.

Voters
Profile icon
CosmicBear
Comments
hotnewtop
Profile icon
ch1ck3n

use a python repl

Profile icon
ruiwenge2

why are you using an html repl?

Profile icon
ruiwenge2

try using a Python repl

Profile icon
CosmicBear

@ruiwenge2

image

Still not working