added from flask import redirect, render_template, request, Flask and from werkzeug.exceptions import BadRequest, NotFound