Skip to content

Commit 51dc81a

Browse files
committed
Merge pull request #280 from abrinsmead/patch-1
Set browser focus on redirect link
2 parents de515e2 + 6f39415 commit 51dc81a

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)