aboutsummaryrefslogtreecommitdiffstats
path: root/debug_toolbar/templates
diff options
context:
space:
mode:
authorAlex Brinsmead2012-05-07 15:30:04 -0700
committerAlex Brinsmead2012-05-07 15:30:04 -0700
commit6f394151a76634143bc6ef3c8224abf192132db1 (patch)
treec779281cc58412ed9fcd31c654f170fe6f9d3a2d /debug_toolbar/templates
parentde515e2882f1e141865a27292bcda4d394ce601d (diff)
downloaddjango-debug-toolbar-6f394151a76634143bc6ef3c8224abf192132db1.tar.bz2
Set browser focus to redirect_to link so user can hit enter and fly through redirect screens like a boss.
Diffstat (limited to 'debug_toolbar/templates')
-rw-r--r--debug_toolbar/templates/debug_toolbar/redirect.html5
1 files changed, 4 insertions, 1 deletions
diff --git a/debug_toolbar/templates/debug_toolbar/redirect.html b/debug_toolbar/templates/debug_toolbar/redirect.html
index 250e3e8..d911778 100644
--- a/debug_toolbar/templates/debug_toolbar/redirect.html
+++ b/debug_toolbar/templates/debug_toolbar/redirect.html
@@ -4,9 +4,12 @@
</head>
<body>
<h1>HttpResponseRedirect</h1>
-<p>{% trans 'Location' %}: <a href="{{ redirect_to }}">{{ redirect_to }}</a></p>
+<p>{% trans 'Location' %}: <a id="redirect_to" href="{{ redirect_to }}">{{ redirect_to }}</a></p>
<p class="notice">
{% trans "The Django Debug Toolbar has intercepted a redirect to the above URL for debug viewing purposes. You can click the above link to continue with the redirect as normal. If you'd like to disable this feature, set the <code>DEBUG_TOOLBAR_CONFIG</code> dictionary's key <code>INTERCEPT_REDIRECTS</code> to <code>False</code>." %}
</p>
+<script type="text/javascript">
+ document.getElementById('redirect_to').focus();
+</script>
</body>
</html>