Flask-PyMongo - init_app() missing 1 required positional argument: 'app'
问题 i am trying to initialise my db using flask-pymongo. But i get the following error, File "run.py", line 22, in app = create_app("config") File "run.py", line 11, in create_app mongo.init_app(app) TypeError: init_app() missing 1 required positional argument: 'app' run.py from flask import Flask from app import api_bp from db import mongo def create_app(config_filename): app = Flask(__name__) app.config.from_object(config_filename) app.register_blueprint(api_bp, url_prefix='/api') mongo.init