Is there a way to make all pages in a Flask app show the same content? [duplicate]

Solution
@app.before_request
def check_under_maintenance():
    if maintenance_mode == 1:  #this flag can be anything, read from file,db or anything
        abort(503) 

@app.route('/')
def index():
    return "This is Admiral Ackbar, over"

@app.errorhandler(503)
def error_503(error):
    return render_template("maintenance.html")