diff --git a/README.md b/README.md index f4fb0e9..094c6d7 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ In order to use it with your version of Django: ```bash django-admin --version ->> 5.0 +>> 5.1 ``` ## Create the Django project @@ -20,9 +20,9 @@ replacing the `{{ project_name }}` and `{{ version }}` sections. django-admin startproject {{ project_name }} --template https://github.com/mongodb-labs/django-mongodb-project/archive/refs/heads/{{ version }}.x.zip ``` -For a project named `5_0_example` that runs on `django==5.0.*` +For a project named `5_1_example` that runs on `django==5.1.*` the command would look like this: ```bash -django-admin startproject 5_0_example --template https://github.com/mongodb-labs/django-mongodb-project/archive/refs/heads/5.0.x.zip -``` \ No newline at end of file +django-admin startproject 5_1_example --template https://github.com/mongodb-labs/django-mongodb-project/archive/refs/heads/5.1.x.zip +``` diff --git a/project_name/settings.py-tpl b/project_name/settings.py-tpl index 3a90b69..3d80dee 100644 --- a/project_name/settings.py-tpl +++ b/project_name/settings.py-tpl @@ -79,6 +79,10 @@ DATABASES = { "default": django_mongodb_backend.parse_uri("mongodb://localhost:27017/{{ project_name }}"), } +# Custom database router +# https://docs.djangoproject.com/en/dev/ref/settings/#database-routers +DATABASE_ROUTERS = ["django_mongodb_backend.routers.MongoRouter"] + # Password validation # https://docs.djangoproject.com/en/{{ docs_version }}/ref/settings/#auth-password-validators