Here the problem is that I am trying to use my db connection in my blueprints, but I cannot seem to avoid an importation error despite my efforts to import. Here is my original question:
There is a suggestion from the original poster at: Circular import of db reference using Flask-SQLAlchemy and Blueprints, but there has to be an easier way of doing things.
I've tried the suggestion in my original question which leads to the importation error when trying to pull in the mongo connection in my blueprint. The error is:
ImportError: cannot import name 'mongo'
I've also tried moving the import location so its after the db connection in my login.py, however none of this seems to work. Where can I find a simple working example that I can use that appears to be bulletproof.