from flask import ( Flask, render_template, request, render_template_string ) app = Flask(__name__) @app.route('/', methods=['GET', 'POST']) def index(): output = "" if request.method == 'POST': search_term = request.form.get('search_term', '') output = f'Backup "' + search_term + '" is not available due to technical issues.' return render_template('index.html', search_result=render_template_string(output)) @app.route('/about') def about(): return render_template('about.html') @app.route('/contact') def contact(): return render_template('contact.html')