Skip to content
Advertisement

how to open url in new tab from django?

i have to open the result page using render_to_response on a new tab

Advertisement

Answer

Django is server-side, opening in a new tab is client-side. So use an <A> with a target="_blank"

http://www.google.com/search?sourceid=chrome&ie=UTF-8&q=target%3Dblank

But of course spawning new windows/tabs is annoying for the user, so try not to do that after all.

Advertisement