I am following this example here:
http://docs.mongodb.org/manual/tutorial/write-a-tumblelog-application-with-flask-mongoengine/
My problem lies here:
from flask import Flask
from flask.ext.mongoengine import MongoEngine
app = Flask(__name__)
app.config["MONGODB_DB"] = "my_tumble_log"
app.config["SECRET_KEY"] = "KeepThisS3cr3t"
db = MongoEngine(app)
if __name__ == '__main__':
app.run()
This assumes that the MONGODB_DB is “my_tumble_log” on my local machine and default port. What if my mongo database is on a remote machine with a different port? How would I modify the example to allow this?
I have tried adding a line before the MONGODB_DB app.config:
app.config['MONGODB_CONNSTRING'] = "mongodb://myremotehost:myport"
Though it has no effect whatsoever.
The following configuration settings are available: