Django MongoDB Backend
Django MongoDB Backend is a Django database backend that uses PyMongo to connect to MongoDB.
Documentation
Documentation written in the style of MongoDB's documentation is available at https://www.mongodb.com/docs/languages/python/django-mongodb/current/.
Documentation written in the style of Django's documentation is available at https://django-mongodb-backend.readthedocs.io/en/latest/.
Quick Start
Install
Use the version of django-mongodb-backend that corresponds to your version of
Django. For example, to get the latest compatible release for Django 6.1.x:
pip install django-mongodb-backend==6.1.*
Create a project
From your shell, run the following command to create a new Django project
called example using our project template. Make sure the end of the template
URL corresponds to your version of Django (e.g. 6.1.x.zip for any Django
6.1.x version).
django-admin startproject example --template https://github.com/mongodb-labs/django-mongodb-project/archive/refs/heads/6.1.x.zip
You can check what version of Django you're using with:
django-admin --version
Connect to the database
Navigate to your example/settings.py file and replace the DATABASES
setting using your connection string:
DATABASES = {
"default": {
"ENGINE": "django_mongodb_backend",
"HOST": "<CONNECTION_STRING_URI>",
"NAME": "db_name",
},
}
[!TIP] You can quickly and easily deploy a free cluster with MongoDB Atlas.
Run the server
To verify that you correctly configured your project, run the following command from your project root:
python manage.py runserver
Then, visit http://127.0.0.1:8000/. This page displays a "Congratulations!" message and an image of a rocket.
Getting Help
You can ask usage questions on our support channels.
Reporting Bugs and Requesting Features
To report a bug or request a new feature in Django MongoDB Backend, please open an issue in JIRA:
- Create a JIRA account.
- Navigate to the Python Integrations project.
- Click Create Issue. Please provide as much information as possible about the issue and the steps to reproduce it.
Bug reports for the Django MongoDB Backend project can be viewed by everyone.
If you identify a security vulnerability in this project or in any other MongoDB project, please report it according to the instructions found at Create a Vulnerability Report.
Metadata
Release files for django-mongodb-backend 6.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| django_mongodb_backend-6.1.0.tar.gz | 256.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| django_mongodb_backend-6.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 395.6 kB
Release files / django_mongodb_backend-6.1.0.tar.gz
| Download URL | django_mongodb_backend-6.1.0.tar.gz |
|---|---|
| Size | 256.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
95d834c3b758f5e47bd568cabb0b9181d97ca1a6dcbc14dcbfdcac35682aad76
|
|
BLAKE2b-256 checksum How to use checksums |
04ed7a18b826ace9547fa119d846b085ca813474b0cfb36514a697458252c5df
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 17, 2026.
Transparency logRelease files / django_mongodb_backend-6.1.0-py3-none-any.whl
| Download URL | django_mongodb_backend-6.1.0-py3-none-any.whl |
|---|---|
| Size | 138.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
21ac631bf80b5807913ce7b9f386744b72a657cad05b6303bbe0515456ff63af
|
|
BLAKE2b-256 checksum How to use checksums |
d5d5fd5c55c60fe587f718867f1a960daf477f786466b55126854c3763c6c4d1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 17, 2026.
Transparency log