MongoEngine/flask-mongoengine — pull request #104 by wcdolphin (2014-08-15 08:46:38+00:00)
Title: Allows and emphasizes MongoDB URI usage in configuration

Currently, it is difficult to configure the connection settings for Flask-MongoEngine. While a MongoDB URI is technically supported, it requires that a user specify a database name in addition to the one in the URI.

This PR fixes this issue by both
1. Extracting the database name from the URI (as per Mongoengine)
2. Using a default database name of 'test', as you would expect.

Note, I have also submitted pull request https://github.com/MongoEngine/mongoengine/pull/737 fixing #2 in the driver layer, whereI believe it should be handled.

This change has a number of consequences:
1. The documentation is now clearer on how to configure Flask-Mongoengine, and more obviously supports the most common configuration pattern today (using a URI).
2. The extension will work out of the box with no configuration at all, and simply do what you would expect! (Connect to the test database on localhost).