Skip to content

Commit b160131

Browse files
committed
Implement MQL panel for Django Debug Toolbar
1 parent 1475783 commit b160131

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

django_mongodb_extensions/debug_toolbar/panels/mql/utils.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,15 @@
1616

1717
MQL_PANEL_ID = "MQLPanel"
1818

19-
# Default maximum number of documents to return when re-executing queries
19+
# Default maximum number of documents to return when re-executing queries.
20+
# This limit prevents performance issues when displaying large result sets in the
21+
# debug toolbar's Sel view.
22+
#
23+
# To customize this value, add the following setting to your Django settings file:
24+
#
25+
# DJDT_MQL_MAX_SELECT_RESULTS = 200 # or any other integer value
26+
#
27+
# The setting is read by the get_max_select_results() function below.
2028
DEFAULT_MAX_SELECT_RESULTS = 100
2129

2230

django_mongodb_extensions/templates/debug_toolbar/panels/mql_select.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ <h3>{% translate "MQL selected" %}</h3>
1414
<dd>{{ alias }}</dd>
1515
</dl>
1616
{% if result %}
17+
<h4>{% translate "MQL Query Results" %}</h4>
1718
<table>
1819
<thead>
1920
<tr>

0 commit comments

Comments
 (0)