You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
File "/home/clownshoes/project/venv/local/lib/python2.7/site-packages/flask_mongoalchemy/__init__.py", line 116, in init_app
"(the %s setting)." % key('DATABASE'))
flask_mongoalchemy.ImproperlyConfiguredError: You should provide a database name (the MONGOALCHEMY_DATABASE setting).
The database name is the final value after the port number in the URI.
init_app actually gets the uri at line 119. It seems that the DATABASE variable check might do it's job in _get_mongo_uri just as well, and avoid this problem by declaring DATABASE by snipping it off the end of CONNECTION_STRING. (unless I'm reading it wrong, and brother, I am prone to that . . .)
The text was updated successfully, but these errors were encountered:
I am attempting to connect with a mongolab uri provided by heroku. I store it as an evironment variable.
In my config.py, I declare it like so:
... whch results in the following:
The database name is the final value after the port number in the URI.
When I actually put the database name in like so:
I can successfully connect.
init_app actually gets the uri at line 119. It seems that the DATABASE variable check might do it's job in _get_mongo_uri just as well, and avoid this problem by declaring DATABASE by snipping it off the end of CONNECTION_STRING. (unless I'm reading it wrong, and brother, I am prone to that . . .)
The text was updated successfully, but these errors were encountered: