We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e71a348 commit 2c1b9eaCopy full SHA for 2c1b9ea
.github/workflows/mongodb_settings.py
@@ -1,10 +1,16 @@
1
import os
2
3
+from pymongo.uri_parser import parse_uri
4
+
5
if mongodb_uri := os.getenv("MONGODB_URI"):
6
db_settings = {
7
"ENGINE": "django_mongodb_backend",
8
"HOST": mongodb_uri,
9
}
10
+ # Workaround for https://github.com/mongodb-labs/mongo-orchestration/issues/268
11
+ uri = parse_uri(mongodb_uri)
12
+ if uri.get("username") and uri.get("password"):
13
+ db_settings["OPTIONS"] = {"tls": True, "tlsAllowInvalidCertificates": True}
14
DATABASES = {
15
"default": {**db_settings, "NAME": "djangotests"},
16
"other": {**db_settings, "NAME": "djangotests-other"},
0 commit comments