Bug Fix: AttributeError: 'Flask' object has no attribute 'before_first_request'.
1. Problem

2. Analysis

Python is misleading here. @app.before_first_request is correct if ever, because it is for one-off task that has to execute prior to any request.
3. Solution
4. Result

Last updated