Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Flask Redirect New Tab

Tags:

python

flask

Does anyone know if flask redirect is able to open a link / URL in a new tab?

@app.route('/test')
def my_page():

  return redirect('http://mylink.com', 301)

I would like if the mylink website opened in a new tab, any insights?

like image 400
jmbmxer Avatar asked Oct 01 '13 23:10

jmbmxer


1 Answers

As far as I know that would not be a flask issue. You have to open a new tab within your html code or with Javascript.

example: <a href="http://mylink.com" target="_blank">Link</a>

The server has no power over what the browser does in this case.

like image 167
Marco Pashkov Avatar answered Sep 17 '22 17:09

Marco Pashkov