custom 404 page flask
from flask import render_template
@app.errorhandler(404)
def page_not_found(e): # e must be in there
# note that we set the 404 status, this is what it catches
return render_template('404.html'), 404
custom 404 page flask
from flask import render_template
@app.errorhandler(404)
def page_not_found(e): # e must be in there
# note that we set the 404 status, this is what it catches
return render_template('404.html'), 404
flask return 404
I had the same issue. I had it because I changed the parameters SERVER_NAMEof the config to a name which is not the name of the server.
You can solve this bug by removing SERVER_NAME from the config if you have it.
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us