summaryrefslogtreecommitdiff
path: root/docs/ref
diff options
context:
space:
mode:
authorThomas Chaumeny <thomas.chaumeny@polyconseil.fr>2014-09-22 18:46:43 +0200
committerTim Graham <timograham@gmail.com>2014-09-26 12:12:40 -0400
commit17557d068c43bd61cdc6c18caf250ffa469414a1 (patch)
treef404b1f0c5f03bcdb14d39282ed6ec686085909a /docs/ref
parentd1ca70110f49f0be90206c8da516ac16aebc8c75 (diff)
Fixed #8408 -- Added ModelAdmin.show_full_result_count to avoid COUNT() query.
Thanks lidaobing for the suggestion.
Diffstat (limited to 'docs/ref')
-rw-r--r--docs/ref/contrib/admin/index.txt13
1 files changed, 13 insertions, 0 deletions
diff --git a/docs/ref/contrib/admin/index.txt b/docs/ref/contrib/admin/index.txt
index ca55df3ce7..bf34fa47f1 100644
--- a/docs/ref/contrib/admin/index.txt
+++ b/docs/ref/contrib/admin/index.txt
@@ -1160,6 +1160,19 @@ subclass::
:meth:`ModelAdmin.get_search_results` to provide additional or alternate
search behavior.
+.. attribute:: ModelAdmin.show_full_result_count
+
+ .. versionadded:: 1.8
+
+ Set ``show_full_result_count`` to control whether the full count of objects
+ should be displayed on a filtered admin page (e.g. ``99 results (103 total)``).
+ If this option is set to ``False``, a text like ``99 results (Show all)``
+ is displayed instead.
+
+ The default of ``show_full_result_count=True`` generates a query to perform
+ a full count on the table which can be expensive if the table contains a
+ large number of rows.
+
.. attribute:: ModelAdmin.view_on_site
.. versionadded:: 1.7