You can pass url_for the endpoint function name for /root/ .
For example, if you have:
@app.route('/root/') def rootindex(): return "this is the index for the whole site."
elsewhere in your application you can:
redirect(url_for('rootindex'))
To trigger a redirect here. When you put . before the line, you go to url_for , which tells it to look for the endpoint in the current project. If you leave . off, you tell him to search for the endpoint in the app
source share