user6216224
user6216224

Reputation:

Display main page when an error occurs

The application consists of only one page. Instead of error pages it should simple display the main site. How should I implement the error handles for that?

Upvotes: 0

Views: 33

Answers (1)

Raja Simon
Raja Simon

Reputation: 10305

You can do that with the help of error handlers

i.e)

@app.errorhandler(404)
def page_not_found(e):
    return render_template('base.html'), 404

Upvotes: 1

Related Questions