[Django]-Open HttpResponseRedirect in a new tab, Django

3👍

Django, or even the HTTP specification does not provide a way to open a redirect in a new tab. You have, however, some other options.

You could send a response with a piece of javascript that opens the page in a new tab: window.open(url, '_blank');

Another way is using an <a> with target="_blank"

👤jk-5

Leave a comment