aboutsummaryrefslogtreecommitdiffstats
path: root/example
diff options
context:
space:
mode:
authorDavid Cramer2011-09-16 01:09:01 -0700
committerDavid Cramer2011-09-16 01:09:01 -0700
commit8278bb0f24d925288740c23a2315e9c5a27a3290 (patch)
tree5dce59d9bd497a19e6cbaf8aebfc697200368b11 /example
parent5a3813d2bb4fb63d66b1b8a13edb8354b36a28b4 (diff)
parent69f1c7733e29ee9ea3e4670f2183deb52f58a871 (diff)
downloaddjango-debug-toolbar-8278bb0f24d925288740c23a2315e9c5a27a3290.tar.bz2
Merge pull request #206 from lincolnloop/stats_decouple
Decouple statistics from presentation
Diffstat (limited to 'example')
-rw-r--r--example/example.dbbin55296 -> 55296 bytes
-rw-r--r--example/settings.py8
-rw-r--r--example/templates/index.html20
3 files changed, 17 insertions, 11 deletions
diff --git a/example/example.db b/example/example.db
index e0048d8..7acdc0d 100644
--- a/example/example.db
+++ b/example/example.db
Binary files differ
diff --git a/example/settings.py b/example/settings.py
index 11b0117..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',
-) \ No newline at end of file
+)
+
+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>