Skip to content

Commit e74553c

Browse files
committed
INTPYTHON-743 Configure DATABASES with connection string in HOST
1 parent 9d648d8 commit e74553c

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

project_name/settings.py-tpl

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@ For the full list of settings and their values, see
1010
https://docs.djangoproject.com/en/{{ docs_version }}/ref/settings/
1111
"""
1212

13-
import django_mongodb_backend
14-
1513
from pathlib import Path
1614

1715
# Build paths inside the project like this: BASE_DIR / 'subdir'.
@@ -75,7 +73,11 @@ WSGI_APPLICATION = '{{ project_name }}.wsgi.application'
7573
# https://docs.djangoproject.com/en/{{ docs_version }}/ref/settings/#databases
7674

7775
DATABASES = {
78-
"default": django_mongodb_backend.parse_uri("mongodb://localhost:27017/{{ project_name }}"),
76+
'default': {
77+
'ENGINE': 'django_mongodb_backend',
78+
'HOST': 'mongodb://localhost:27017/',
79+
'NAME': '{{ project_name }}',
80+
},
7981
}
8082

8183
# Database routers

0 commit comments

Comments
 (0)