def login_redirect():
    value = request.form.get('next', '') or \
            request.args.get('next', '')
    return {
        'REDIRECT_FIELD_NAME': 'next',
        'REDIRECT_FIELD_VALUE': value,
        'REDIRECT_QUERYSTRING': value and ('next=' + value) or ''
    }
Load current redirect to context.
dataset/ETHPy150Open omab/python-social-auth/social/apps/flask_app/template_filters.py/login_redirect