<commit_before>====================
Django Debug Toolbar
====================

The Django Debug Toolbar is a configurable set of panels that display various
debug information about the current request/response.  It is a small toolbar
that, when activated, situates itself in the top-right location of the browser
window.  When particular panels are clicked, more details about that panel's
content are displayed.

Currently, the following panels have been written and are working:

- Django version
- SQL queries including time to execute
- Request timer
- Common HTTP headers
- GET/POST variable display

If you have ideas for other panels please let us know.

Installation
============

#. Add the `debug_toolbar` directory to your Python path.

#. Add the following middleware to your project's `settings.py` file:

	``'debug_toolbar.middleware.DebugToolbarMiddleware',``

   Tying into middleware allows each panel to be instantiated on request and
   rendering to happen on response.

   The order of MIDDLEWARE_CLASSES is important: the Debug Toolbar middleware 
   must come after any other middleware that encodes the response's content 
   (such as GZipMiddleware).

#. Add a tuple called `DEBUG_TOOLBAR_PANELS` to your ``settings.py`` file that
   specifies the full Python path to the panel that you want included in the 
   Toolbar.  This setting looks very much like the `MIDDLEWARE_CLASSES` setting.
   For example::

	DEBUG_TOOLBAR_PANELS = (
	    'debug_toolbar.panels.version.VersionDebugPanel',
	    'debug_toolbar.panels.sql.SQLDebugPanel',
	    'debug_toolbar.panels.timer.TimerDebugPanel',
	    'debug_toolbar.panels.headers.HeaderDebugPanel',
	    'debug_toolbar.panels.http_vars.HttpVarsDebugPanel',<commit_msg>Adding a cache statistics panel contributed by <NAME>.<commit_after>====================
Django Debug Toolbar
====================

The Django Debug Toolbar is a configurable set of panels that display various
debug information about the current request/response.  It is a small toolbar
that, when activated, situates itself in the top-right location of the browser
window.  When particular panels are clicked, more details about that panel's
content are displayed.

Currently, the following panels have been written and are working:

- Django version
- SQL queries including time to execute
- Request timer
- Common HTTP headers
- GET/POST variable display
- Cache stats

If you have ideas for other panels please let us know.

Installation
============

#. Add the `debug_toolbar` directory to your Python path.

#. Add the following middleware to your project's `settings.py` file:

	``'debug_toolbar.middleware.DebugToolbarMiddleware',``

   Tying into middleware allows each panel to be instantiated on request and
   rendering to happen on response.

   The order of MIDDLEWARE_CLASSES is important: the Debug Toolbar middleware 
   must come after any other middleware that encodes the response's content 
   (such as GZipMiddleware).

#. Add a tuple called `DEBUG_TOOLBAR_PANELS` to your ``settings.py`` file that
   specifies the full Python path to the panel that you want included in the 
   Toolbar.  This setting looks very much like the `MIDDLEWARE_CLASSES` setting.
   For example::

	DEBUG_TOOLBAR_PANELS = (
	    'debug_toolbar.panels.version.VersionDebugPanel',
	    'debug_toolbar.panels.timer.TimerDebugPanel',
	    'debug_toolbar.panels.headers.HeaderDebugPanel',
	    'debug_toolbar.panels.http_vars.HttpVarsDebugPanel',
	    'debug_toolbar.panels.sql.SQLDebugPanel',
	    'debug_toolbar.panels.cache.CacheDebugPanel',
{'fraction_non_alphanumeric': 0.08505875769445999, 'fraction_numerical': 0.0, 'mean_word_length': 4.53405572755418, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4382862', 'n_tokens_mistral': 990, 'n_tokens_neox': 936, 'n_words': 395}