diff options
| author | Yann Malet | 2011-09-11 06:02:22 +0200 | 
|---|---|---|
| committer | Yann Malet | 2011-09-11 06:02:22 +0200 | 
| commit | 3d0a7f2f64f0c21d0d73655e3d908dc6f1608223 (patch) | |
| tree | 5666f84915deb5623b095ae101855c92959c9794 /example | |
| parent | e0aa1e9dd987cc43996647b6096fb6a21b77ab29 (diff) | |
| download | django-debug-toolbar-3d0a7f2f64f0c21d0d73655e3d908dc6f1608223.tar.bz2 | |
Cache an HTML fragment on to exercise the cache pannel.
Diffstat (limited to 'example')
| -rw-r--r-- | example/settings.py | 6 | ||||
| -rw-r--r-- | example/templates/index.html | 20 | 
2 files changed, 16 insertions, 10 deletions
| diff --git a/example/settings.py b/example/settings.py index b2b98ee..fac99af 100644 --- a/example/settings.py +++ b/example/settings.py @@ -41,7 +41,11 @@ DEBUG_TOOLBAR_PANELS = (      'debug_toolbar.panels.request_vars.RequestVarsDebugPanel',      'debug_toolbar.panels.sql.SQLDebugPanel',      'debug_toolbar.panels.template.TemplateDebugPanel', -    #'debug_toolbar.panels.cache.CacheDebugPanel', +    'debug_toolbar.panels.cache.CacheDebugPanel',      'debug_toolbar.panels.signals.SignalDebugPanel',      'debug_toolbar.panels.logger.LoggingPanel',  ) + +CACHE_BACKEND = 'dummy://' +#CACHE_BACKEND = 'memcached://127.0.0.1:11211' + diff --git a/example/templates/index.html b/example/templates/index.html index 6fd3a92..d7d8a2b 100644 --- a/example/templates/index.html +++ b/example/templates/index.html @@ -1,16 +1,18 @@ +{% load cache %}  <html>  <head> -	<meta http-equiv="content-type" content="text/html; charset=utf-8"> -	<title>Index of Tests</title> +    <meta http-equiv="content-type" content="text/html; charset=utf-8"> +    <title>Index of Tests</title>  </head>  <body> -	<h1>Index of Tests</h1> -	<ul> -		<li><a href="/jquery/index/">jQuery 1.2.6</a></li> -		<li><a href="/mootools/index/">MooTools 1.2.4</a></li> -		<li><a href="/prototype/index/">Prototype 1.6.1</a></li> -	</ul> - +    <h1>Index of Tests</h1> +    {% cache 10 index_cache %} +    <ul> +        <li><a href="/jquery/index/">jQuery 1.2.6</a></li> +        <li><a href="/mootools/index/">MooTools 1.2.4</a></li> +        <li><a href="/prototype/index/">Prototype 1.6.1</a></li> +    </ul> +    {% endcache %}  </body>  </html> | 
