python脚本,输出重定向信号,将浏览器指向目标登陆页面

标签 python http redirect

我正在将 html 表单发布到 python 脚本。但是,有没有办法执行 return redirect("/thanks.html") ,这将允许 python 脚本运行,并将用户重定向到另一个 URL。正在发布的 python 脚本也将继续发布到另一个 python 脚本。我尝试了 ajax 和 javascript。我无法同时发布数据和重定向用户。

最佳答案

尝试返回此 html:

<html>
<head>
<script>
window.location="/thanks.html" #or whatever the url is
</script>
</head>
<html>

关于python脚本,输出重定向信号,将浏览器指向目标登陆页面,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51074876/

相关文章:

python - Airflow 自定义 jinja2 过滤器

python - Pandas 数据框分配不更新数据框

python - 如何在 Python 中包装内置方法? (或 'how to pass them by reference' )

java - 纯 HTTP GET 和 POST 通信的安全数据序列化

angular - 从 API 响应中读取响应 header - Angular 5 + TypeScript

php - 移动重定向 - 返回桌面

azure - 如何将重写规则添加到Azure web.config以便某些请求不被重定向?

python - 如何在 google colab 上升级 pandas

iphone - http头请求中的UDID iphone

php - 对网站进行地理定位并仍然使 seo 正常工作