Forums

Session error

I have free plan in pythonanywhere.com. My code is crashing (internal Server Error) @ 'session .... ' part:

    @auth.route('/login', methods = ['POST'])

def login_post(): email = request.form.get('email') password = request.form.get('password') # session["email"] = email print(email, password) # session['logged_in'] = True # Store user in session # request.session['logged_in'] = True

return redirect( url_for('main.dashboard'))

Please guide me what can be the problem?

Check your error and server logs for tracebacks that you can use to start debugging.