How to Solve NameError: name 'MongoAlchemy' is not defined -- flask

Solution: Import the 'MongoAlchemy' module

To Solve the error, add the following line to the top of your code.

from flask.ext.mongoalchemy import MongoAlchemy

 

For more information:
Python flask MongoAlchemy