Extensions for Django MongoDB Backend
Project description
django-mongodb-extensions
Extensions for Django MongoDB Backend
Installation
pip install django-mongodb-extensions
Extensions
MQL Panel
This panel for Django Debug Toolbar provides insights into MongoDB queries executed during a request similar to how the SQL panel works for relational databases.
Features:
- View all MongoDB queries (MQL) executed during a request
- See query execution time and identify slow queries
- Re-execute read operations (aggregate) directly from the toolbar
- Explain query execution plans
- Color-coded query grouping for easy identification
- Detailed query statistics and performance metrics
Configure the MQL Panel
First, install and configure Django Debug Toolbar by following their installation instructions.
- Add to
INSTALLED_APPSin your Django settings:
INSTALLED_APPS = [
# ...
"django_mongodb_extensions",
# ...
]
- Add the MQL Panel to your debug toolbar configuration:
DEBUG_TOOLBAR_PANELS = [
"debug_toolbar.panels.history.HistoryPanel",
"debug_toolbar.panels.versions.VersionsPanel",
"debug_toolbar.panels.timer.TimerPanel",
"debug_toolbar.panels.settings.SettingsPanel",
"debug_toolbar.panels.headers.HeadersPanel",
"debug_toolbar.panels.request.RequestPanel",
# Add this:
"django_mongodb_extensions.mql_panel.MQLPanel",
"debug_toolbar.panels.templates.TemplatesPanel",
"debug_toolbar.panels.staticfiles.StaticFilesPanel",
"debug_toolbar.panels.cache.CachePanel",
"debug_toolbar.panels.signals.SignalsPanel",
"debug_toolbar.panels.redirects.RedirectsPanel",
"debug_toolbar.panels.profiling.ProfilingPanel",
]
- Optional: Configure settings.
# Maximum number of documents to return when re-executing select
# queries (default is 100).
DJDT_MQL_MAX_QUERY_RESULTS = 25
# Queries slower than this threshold (in milliseconds) are highlighted
# in the debug toolbar (default is 500 ms).
DJDT_MQL_WARNING_THRESHOLD = 1000
License
See LICENSE file for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file django_mongodb_extensions-0.2.0.tar.gz.
File metadata
- Download URL: django_mongodb_extensions-0.2.0.tar.gz
- Upload date:
- Size: 20.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f31c9fbfc0e8e32c0f47b8c10db825ccd2428146fc43c9a9c740b730c0de924a
|
|
| MD5 |
5190f73d32359757f4e671216a96aca7
|
|
| BLAKE2b-256 |
572c5348e664e38e45dc4aff242e89d7d0ceb2f24b53812da694ec35d1e0c508
|
Provenance
The following attestation bundles were made for django_mongodb_extensions-0.2.0.tar.gz:
Publisher:
release-python.yml on mongodb-labs/django-mongodb-extensions
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
django_mongodb_extensions-0.2.0.tar.gz -
Subject digest:
f31c9fbfc0e8e32c0f47b8c10db825ccd2428146fc43c9a9c740b730c0de924a - Sigstore transparency entry: 1218791780
- Sigstore integration time:
-
Permalink:
mongodb-labs/django-mongodb-extensions@16a4ddf8ae8f24186fbec364cbd4c7949faf5fd3 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/mongodb-labs
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-python.yml@16a4ddf8ae8f24186fbec364cbd4c7949faf5fd3 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file django_mongodb_extensions-0.2.0-py3-none-any.whl.
File metadata
- Download URL: django_mongodb_extensions-0.2.0-py3-none-any.whl
- Upload date:
- Size: 20.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9ac4d8a287efc9a26d39e3190f7cc3a1d6f9339a0232b918bec400d5237ec93c
|
|
| MD5 |
0a17f516983472ad8222d4c530a1c059
|
|
| BLAKE2b-256 |
39debab54bad00202a5b888b6677de43a6666a71c013952f5b4d4a942ea4d3a7
|
Provenance
The following attestation bundles were made for django_mongodb_extensions-0.2.0-py3-none-any.whl:
Publisher:
release-python.yml on mongodb-labs/django-mongodb-extensions
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
django_mongodb_extensions-0.2.0-py3-none-any.whl -
Subject digest:
9ac4d8a287efc9a26d39e3190f7cc3a1d6f9339a0232b918bec400d5237ec93c - Sigstore transparency entry: 1218791850
- Sigstore integration time:
-
Permalink:
mongodb-labs/django-mongodb-extensions@16a4ddf8ae8f24186fbec364cbd4c7949faf5fd3 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/mongodb-labs
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-python.yml@16a4ddf8ae8f24186fbec364cbd4c7949faf5fd3 -
Trigger Event:
workflow_dispatch
-
Statement type: