Skip to content

Commit 15c797c

Browse files
committed
PYTHON-4814 Create project and app templates
- Update readme
1 parent 9947917 commit 15c797c

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,23 @@ The development version of this package supports Django 5.0.x. To install it:
1010

1111
`pip install git+https://github.com/mongodb-labs/django-mongodb`
1212

13+
### Via templates
14+
15+
To create a new Django project that uses MongoDB, you can use the templates in this repository. For example:
16+
17+
```console
18+
$ django-admin startproject --template=project_template mysite
19+
$ django-admin startapp --template=app_template polls
20+
```
21+
22+
Then
23+
```console
24+
$ python manage.py makemigrations admin auth contenttypes
25+
$ python manage.py migrate
26+
```
27+
28+
### Manual steps
29+
1330
Configure the Django `DATABASES` setting similar to this:
1431

1532
```python

0 commit comments

Comments
 (0)