text: from datetime import datetime
  from flask import Flask, render_template, request, redirect, url_for
  app = Flask(__name__)
  
  
  @app.route('/')
  def index():
     print('Request for index page received')
     return render_template('index.html')
  
  
  @app.route('/hello', methods=['POST'])
  def hello():
     name = request.form.get('name')
  
     if name:
         print('Request for hello page received with name=%s' % name)
         return render_template('hello.html', name = name)
     else:
         print('Request for hello page received with no name or blank name -- redirecting')
         return redirect(url_for('index'))
  
  
  if __name__ == '__main__':
      app.debug = True
      app.run(host="0.0.0.0", port = 8000)
  
  