Skip to content

Commit 6f39415

Browse files
committed
Set browser focus to redirect_to link so user can hit enter and fly through redirect screens like a boss.
1 parent de515e2 commit 6f39415

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

debug_toolbar/templates/debug_toolbar/redirect.html

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,12 @@
44
</head>
55
<body>
66
<h1>HttpResponseRedirect</h1>
7-
<p>{% trans 'Location' %}: <a href="{{ redirect_to }}">{{ redirect_to }}</a></p>
7+
<p>{% trans 'Location' %}: <a id="redirect_to" href="{{ redirect_to }}">{{ redirect_to }}</a></p>
88
<p class="notice">
99
{% 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>." %}
1010
</p>
11+
<script type="text/javascript">
12+
document.getElementById('redirect_to').focus();
13+
</script>
1114
</body>
1215
</html>

0 commit comments

Comments
 (0)