V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
推荐学习书目
Learn Python the Hard Way
Python Sites
PyPI - Python Package Index
http://diveintopython.org/toc/index.html
Pocoo
值得关注的项目
PyPy
Celery
Jinja2
Read the Docs
gevent
pyenv
virtualenv
Stackless Python
Beautiful Soup
结巴中文分词
Green Unicorn
Sentry
Shovel
Pyflakes
pytest
Python 编程
pep8 Checker
Styles
PEP 8
Google Python Style Guide
Code Style from The Hitchhiker's Guide
qiu0130
V2EX  ›  Python

tornado post 之后如何返回当前页面?

  •  
  •   qiu0130 · 2016-05-11 21:36:29 +08:00 · 2760 次点击
    这是一个创建于 2921 天前的主题,其中的信息可能已经有所发展或是发生改变。

    譬如:

    好几个 get

    然后 post 一下之后 怎么才能跳到之前的页面?

    7 条回复    2016-05-12 10:30:16 +08:00
    sivacohan
        1
    sivacohan  
       2016-05-11 21:42:36 +08:00 via Android
    渲染同一个 template 就完了。。。
    misaka19000
        2
    misaka19000  
       2016-05-11 21:45:01 +08:00
    。。。

    试一下把之前的页面保存到 SESSION 中,需要的时候再取出来?
    just1
        3
    just1  
       2016-05-11 21:46:26 +08:00 via Android
    referer?
    CoX
        4
    CoX  
       2016-05-11 21:59:35 +08:00 via iPhone
    post 带上当前 url ,处理完跳转 url
    agnewee
        5
    agnewee  
       2016-05-12 08:48:14 +08:00
    在 post 的 form 里写一个<input type="hidden" value="xxx">(value 传递一个标识)
    然后 post 完根据标识 redirect 。
    qiu0130
        6
    qiu0130  
    OP
       2016-05-12 10:28:29 +08:00
    @misaka19000 想法不错。
    qiu0130
        7
    qiu0130  
    OP
       2016-05-12 10:30:16 +08:00
    @CoX 恩,试一试
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   4830 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 28ms · UTC 10:02 · PVG 18:02 · LAX 03:02 · JFK 06:02
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.