Skip to main content

django-mongodb-extensions

Extensions for Django MongoDB Backend

Documentation

Version Support

Django / Django MongoDB Backend Django Debug Toolbar Django REST Framework
5.2 ≥5.1 ≥3.16
6.0 ≥6.2 ≥3.17

Django version support follows Django's supported versions policy.

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.

  1. Add to INSTALLED_APPS in your Django settings:
INSTALLED_APPS = [
    # ...
    "django_mongodb_extensions",
    # ...
]
  1. 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",
]
  1. 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

Django REST Framework

Serializer support for Django MongoDB Backend models through django_mongodb_extensions.rest_framework. See the documentation for details.

License

See LICENSE file for details.

Release files for django-mongodb-extensions 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for django-mongodb-extensions 0.3.0
File Size Uploaded
django_mongodb_extensions-0.3.0.tar.gz 32.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for django-mongodb-extensions 0.3.0
File Interpreter ABI Platform
django_mongodb_extensions-0.3.0-py3-none-any.whl Python 3 none any Details

Total release size: 57.4 kB

Release files / django_mongodb_extensions-0.3.0.tar.gz

Download URL django_mongodb_extensions-0.3.0.tar.gz
Size 32.4 kB
Tags Source
SHA-256 checksum
How to use checksums
c675ceaddaea0e597c5bbe3971289641f6355c0a9c19839e0415caa1b8ca481d
BLAKE2b-256 checksum
How to use checksums
91b774446d7eb195e616bc04bed23e515a689e89a29a76c2eca6fcb78cf192dd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.13

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 Jun 23, 2026.

Transparency log

Release files / django_mongodb_extensions-0.3.0-py3-none-any.whl

Download URL django_mongodb_extensions-0.3.0-py3-none-any.whl
Size 24.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
79208571c7d9582359451d65c0a2d8c32acffaf0adb3e5bbac987c50e851d226
BLAKE2b-256 checksum
How to use checksums
69fdf32e1fbb08daa961c633c5741791a3508f3750cbd1c8326fe9b26513f965
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.13

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 Jun 23, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.3.0 This release

2 release files

0.2.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page