I'm trying to create an index with a flask-mongokit connection:
db = MongoKit(app)
db.mydatabase.users.create_index("email", unique=True)
But it throws this error at me:
...
host=ctx.app.config.get('MONGODB_HOST'),
AttributeError: 'NoneType' object has no attribute 'app'
If I use Pymongo directly instead:
conn = MongoClient()
conn.mydatabase.users.create_index("email", unique=True)
Everithing works fine!
The problem is that I don't want to manage a pymongo's connection but instead use the one created by the mongokit extension.