def login():
    'Store the current URL as the redirect target on success, then redirect\n    to the login endpoint for the current app.\n\n    :return: a :func:`~flask.redirect` to the login endpoint for the current\n      :class:`~flask.Flask` app.\n    '
    session[REDIRECT_KEY] = urlparse(request.url)._replace(netloc=get_host()).geturl()
    return redirect(url_for('login'))
Store the current URL as the redirect target on success, then redirect
to the login endpoint for the current app.

:return: a :func:`~flask.redirect` to the login endpoint for the current
  :class:`~flask.Flask` app.
def login():
    'Store the current URL as the redirect target on success, then redirect\n    to the login endpoint for the current app.\n\n    :return: a :func:`~flask.redirect` to the login endpoint for the current\n      :class:`~flask.Flask` app.\n    '
    session[REDIRECT_KEY] = urlparse(request.url)._replace(netloc=get_host()).geturl()
    return redirect(url_for('login'))