Resolve Python Flask application factory error

Job ID: 36371399

Budget: $8 – $15 USD

I have a basic Flask app that works locally but when I try to host it on Heroku returns this error:

"raise RuntimeError(
2023-04-10T03:11:45.719739+00:00 app[web.1]: RuntimeError: The current Flask app is not registered with this 'SQLAlchemy' instance. Did you forget to call 'init_app', or did you create multiple 'SQLAlchemy' instances?"

I need a Flask pro to review the application factory and tell me what I'm doing wrong so I can host it successfully on Heroku.
Related categories: Python Flask