fork download
  1. @app.route("/search")
  2. def search():
  3. if "username" in session:
  4. return render_template("search.html")
  5. return render_template("error.html", message="You are not logged in!")
  6.  
  7. @app.route("/logout")
  8. def logout():
  9. session.pop('username', None)
  10. return redirect(url_for('index'))
Runtime error #stdin #stdout #stderr 0.04s 9236KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
Traceback (most recent call last):
  File "./prog.py", line 1, in <module>
NameError: name 'app' is not defined