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
MONGODB_SETTINGS = {
'db': 'xyz',
'host': 'mongodb+srv://xyz-3inen.mongodb.net',
'username': 'root',
'password': 'your_password'
}
when I don't pass database name in host i.e 'mongodb+srv://xyz-3inen.mongodb.net/xyz', it gets connected to test DB even if db and name key is present in MONGODB_SETTINGS
as I dug in, I found _sanitize_settings in connection returns "test" for DB due to URL parsing if it finds any name in URI then it assigns it or else test is the default database. so I tried passing database name in URI
The strange thing is, when the database is being connected to the test database everything works fine.
but the same is not true when I pass the database name in URI.
My first login screen gets stuck on the same screen until I refresh it, but still, the login gets successful i.e it is somehow able to get the login data for validation and validates the user in the database.
I even tried connecting using URI, the connection gets timed out for the first login request until I refresh it.
EDIT NOTE:
Now I am using connect=False but still the first request didn't get served, I Guess it's messing with flask threads something.
Hope if someone can help to get out of this
The text was updated successfully, but these errors were encountered:
MONGODB_SETTINGS = {
'db': 'xyz',
'host': 'mongodb+srv://xyz-3inen.mongodb.net',
'username': 'root',
'password': 'your_password'
}
when I don't pass database name in host i.e 'mongodb+srv://xyz-3inen.mongodb.net/xyz', it gets connected to test DB even if db and name key is present in MONGODB_SETTINGS
as I dug in, I found _sanitize_settings in connection returns "test" for DB due to URL parsing if it finds any name in URI then it assigns it or else test is the default database. so I tried passing database name in URI
The strange thing is, when the database is being connected to the test database everything works fine.
but the same is not true when I pass the database name in URI.
My first login screen gets stuck on the same screen until I refresh it, but still, the login gets successful i.e it is somehow able to get the login data for validation and validates the user in the database.
I even tried connecting using URI, the connection gets timed out for the first login request until I refresh it.
EDIT NOTE:
Now I am using connect=False but still the first request didn't get served, I Guess it's messing with flask threads something.
Hope if someone can help to get out of this
I am using Mono Atlas for development.
MONGODB_SETTINGS = {
'db': 'xyz',
'host': 'mongodb+srv://xyz-3inen.mongodb.net',
'username': 'root',
'password': 'your_password'
}
when I don't pass database name in host i.e 'mongodb+srv://xyz-3inen.mongodb.net/xyz', it gets connected to test DB even if db and name key is present in MONGODB_SETTINGS
as I dug in, I found _sanitize_settings in connection returns "test" for DB due to URL parsing if it finds any name in URI then it assigns it or else test is the default database. so I tried passing database name in URI
The strange thing is, when the database is being connected to the test database everything works fine.
but the same is not true when I pass the database name in URI.
My first login screen gets stuck on the same screen until I refresh it, but still, the login gets successful i.e it is somehow able to get the login data for validation and validates the user in the database.
I even tried connecting using URI, the connection gets timed out for the first login request until I refresh it.
EDIT NOTE:
Now I am using connect=False but still the first request didn't get served, I Guess it's messing with flask threads something.
Hope if someone can help to get out of this
The text was updated successfully, but these errors were encountered: