Skip to content

Commit b659da8

Browse files
authored
Add MongoRouter to DATABASE_ROUTERS (#12)
* Add custom database router * Fix wording
1 parent bdc7efe commit b659da8

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

project_name/settings.py-tpl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,10 @@ DATABASES = {
7979
"default": django_mongodb_backend.parse_uri("mongodb://localhost:27017/{{ project_name }}"),
8080
}
8181

82+
# Database routers
83+
# https://docs.djangoproject.com/en/dev/ref/settings/#database-routers
84+
DATABASE_ROUTERS = ["django_mongodb_backend.routers.MongoRouter"]
85+
8286
# Password validation
8387
# https://docs.djangoproject.com/en/{{ docs_version }}/ref/settings/#auth-password-validators
8488

0 commit comments

Comments
 (0)