推荐学习书目
› 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
darkmatter
V2EX  ›  Python

关于 Tornado 的 URL

  •  
  •   darkmatter · Sep 10, 2016 · 2374 views
    This topic created in 3680 days ago, the information mentioned may be changed or developed.
    http://localhost:8000/api/keyword/测试 /city/测试 /page/0/page_size/20
    如何改成
    http://localhost:8000/api?keyword=测试&city=测试&page=0&page_size=20
    而且其中参数可以互换位置?
    4 replies  •  2016-09-11 11:27:12 +08:00
    janxin
        1
    janxin  
       Sep 10, 2016 via iPhone   ❤️ 1
    self.get_argument
    cloverstd
        2
    cloverstd  
       Sep 10, 2016   ❤️ 1
    nginx rewrite 然后 self.get_argument
    ldehai
        3
    ldehai  
       Sep 11, 2016
    貌似这样写不科学: http://localhost:8000/api?keyword=测试&city=测试&page=0&page_size=20
    ldehai
        4
    ldehai  
       Sep 11, 2016
    可以改成 http://localhost:8000/api/func?keyword=测试&city=测试&page=0&page_size=20
    url schema 配置成(r"/func", FuncHandler)
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   984 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 32ms · UTC 22:38 · PVG 06:38 · LAX 15:38 · JFK 18:38
    ♥ Do have faith in what you're doing.