new_contents: """
  Very simple Flask web site, with one page
  displaying a course schedule.
  
  """
  
  import flask
  from flask import render_template
  from flask import request
  from flask import url_for
  from flask import jsonify # For AJAX transactions
  
  import json
  import logging
  
  import brevet_calc
  # Date handling
  import arrow # Replacement for datetime, based on moment.js
  import datetime # But we still need time
  from dateutil import tz  # For interpreting local times
  
  
  # Our own module
  # import acp_limits
  
  
  ###
  # Globals
  ###
  app = flask.Flask(__name__)
  import CONFIG
  
  import func
  
  import uuid
  app.secret_key = str(uuid.uuid4())
  app.debug=CONFIG.DEBUG
  app.logger.setLevel(logging.DEBUG)
  
  
  ###
  # Pages
  ###
  
  @app.route("/")
  @app.route("/index")
  def index():
    app.logger.debug("Main page entry")
    return flask.render_template('calc.html')
    app.logger.debug("Got a JSON request");
    file = open("static/data/poi.txt")
    poi_dict = read_poi(file)
    flask.session['poi_dict'] = poi_dict
    return flask.render_template('map.html')
  
  @app.errorhandler(404)
  def page_not_found(error):
      app.logger.debug("Page not found")
      flask.session['linkback'] =  flask.url_for("calc")
      return flask.render_template('page_not_found.html'), 404
  
  
  ###############
  #
  # AJAX request handlers
  #   These return JSON, rather than rendering pages.
  #
  ###############
  
  
  #############
  
  
  if __name__ == "__main__":
      import uuid
      app.secret_key = str(uuid.uuid4())
      app.debug=CONFIG.DEBUG
      app.logger.setLevel(logging.DEBUG)
      if app.debug:
          print("Accessible only on localhost")
          app.run(port=CONFIG.PORT)  # Accessible only on localhost
      else:
          print("Opening for global access on port {}".format(CONFIG.PORT))
          app.run(port=CONFIG.PORT, host="0.0.0.0")
  
  
  
subject: Create map.py