“Flask Return 404” Code-Antworten

Benutzerdefinierte 404 -Seiten -Flasche

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
AndyIsHereBoi

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.
Santino

Ähnliche Antworten wie “Flask Return 404”

Fragen ähnlich wie “Flask Return 404”

Weitere verwandte Antworten zu “Flask Return 404” auf Python

Durchsuchen Sie beliebte Code-Antworten nach Sprache

Durchsuchen Sie andere Codesprachen