-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
INTPYTHON-424 Prevent redundant requirement for USER and PASSWORD arguments when URI with authentication is provided #194
base: main
Are you sure you want to change the base?
Conversation
…I with authentication is provided
Django doesn't natively support passing URLs in HOST. There is dj-database-url to parse a URL into the If we go down the road of allowing HOST to contain USER and PASSWORD, we'd need to audit this package (e.g. django-mongodb/django_mongodb/client.py Lines 14 to 18 in ca8ac6a
|
Right, although as @Jibola mentioned to me there is some precedent for this, in that Also note that this came up because I tried to use If we were to merge this, the URI could be passed in without having to "redundantly specify user and pass" and PyMongo will correctly parse the URI and SRV connections will work "as expected". If we don't merge this, we still have to support SRV connections so I propose the following changes to our backend:
|
If we want the user to be able to configure this backend with something like, From a Django perspective, I think it'll be problematic for the user to provide a "complex" URI that contains user, password, and/or database as the |
We can make a small wrapper around the mongodb |
Right, where the wrapper takes the parsed result and translates into the format of Django's |
No description provided.