diff options
| author | Aymeric Augustin | 2013-11-24 12:00:24 +0100 |
|---|---|---|
| committer | Aymeric Augustin | 2013-11-24 12:00:24 +0100 |
| commit | db2de5b85ac1ae099b91bae402d21d6ea36ef306 (patch) | |
| tree | 40238c6a121bd5a37ee4e4519cd648ec36cfd46b /docs/configuration.rst | |
| parent | 03fd1cc81c02a5462aeb4dbce0bfe8a2afdef43d (diff) | |
| download | django-debug-toolbar-db2de5b85ac1ae099b91bae402d21d6ea36ef306.tar.bz2 | |
Make SHOW_TOOLBAR_CALLBACK a dotted path.
Fix #473.
Diffstat (limited to 'docs/configuration.rst')
| -rw-r--r-- | docs/configuration.rst | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/docs/configuration.rst b/docs/configuration.rst index a276aa3..c1fe65d 100644 --- a/docs/configuration.rst +++ b/docs/configuration.rst @@ -85,15 +85,13 @@ Toolbar options * ``SHOW_TOOLBAR_CALLBACK`` - Default: ``None`` + Default: 'debug_toolbar.middleware.show_toolbar' - If set to ``None``, the debug toolbar middleware will use its built-in - ``show_toolbar`` method for determining whether the toolbar should show or - not. The default checks are that ``DEBUG`` must be set to ``True``, the IP - of the request must be in ``INTERNAL_IPS``, and the request must no be an - AJAX request. You can provide your own method for displaying the toolbar - which contains your custom logic. This method should return ``True`` or - ``False``. + This is the dotted path to a function used for determining whether the + toolbar should show or not. The default checks are that ``DEBUG`` must be + set to ``True``, the IP of the request must be in ``INTERNAL_IPS``, and the + request must no be an AJAX request. You can provide your own function that + accepts a request in argument and returns ``True`` or ``False``. Panel options ~~~~~~~~~~~~~ |
