A few days ago I have reset my local flask environment without having captured the dependencies via a pip freeze before I deleted it. Hence I had to re-install
pip freeze
At the time of creating the app:
from flask_wtf.csrf import CsrfProtect csrf = CsrfProtect() app = Flask(__name__) ... csrf.init_app(app) ...