aboutsummaryrefslogtreecommitdiffstats
path: root/debug_toolbar
diff options
context:
space:
mode:
authorDavid Cramer2012-05-07 16:49:47 -0700
committerDavid Cramer2012-05-07 16:49:47 -0700
commit51dc81a7b472fe44c2ca18ed99a42fc747344141 (patch)
treec779281cc58412ed9fcd31c654f170fe6f9d3a2d /debug_toolbar
parentde515e2882f1e141865a27292bcda4d394ce601d (diff)
parent6f394151a76634143bc6ef3c8224abf192132db1 (diff)
downloaddjango-debug-toolbar-51dc81a7b472fe44c2ca18ed99a42fc747344141.tar.bz2
Merge pull request #280 from abrinsmead/patch-1
Set browser focus on redirect link
Diffstat (limited to 'debug_toolbar')
-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>