推荐学习书目
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 · May 11, 2016 · 3343 views
    This topic created in 3686 days ago, the information mentioned may be changed or developed.

    譬如:

    好几个 get

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

    7 replies    2016-05-12 10:30:16 +08:00
    sivacohan
        1
    sivacohan  
    PRO
       May 11, 2016 via Android
    渲染同一个 template 就完了。。。
    misaka19000
        2
    misaka19000  
       May 11, 2016
    。。。

    试一下把之前的页面保存到 SESSION 中,需要的时候再取出来?
    just1
        3
    just1  
       May 11, 2016 via Android
    referer?
    CoX
        4
    CoX  
       May 11, 2016 via iPhone
    post 带上当前 url ,处理完跳转 url
    agnewee
        5
    agnewee  
       May 12, 2016
    在 post 的 form 里写一个<input type="hidden" value="xxx">(value 传递一个标识)
    然后 post 完根据标识 redirect 。
    qiu0130
        6
    qiu0130  
    OP
       May 12, 2016
    @misaka19000 想法不错。
    qiu0130
        7
    qiu0130  
    OP
       May 12, 2016
    @CoX 恩,试一试
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5857 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 44ms · UTC 06:08 · PVG 14:08 · LAX 23:08 · JFK 02:08
    ♥ Do have faith in what you're doing.