Tornado Documentation
http://www.v2ex.com/tornado/
Tornado on GitHub
https://github.com/facebook/tornado/
Tornado Gists
http://tornadogists.org/
pagict
V2EX  ›  Tornado

学习 "Introduction to tornado" 提问

  •  
  •   pagict · Jan 23, 2015 · 5495 views
    This topic created in 4128 days ago, the information mentioned may be changed or developed.
    最近在跟着 Introduction to Tornado 学Tornado,做到Chapter5 的 Live Inventory Reporting 示例的时候,发现没有想要的效果。
    具体就是,应该点了 Add to cart 的button 后会隐藏,换为 Remove from cart button, 另外就是 stock left 数要减少吧,但是现在却都没反应。感觉是javascript 没有正确load,但是小弟又还不懂javascipt。现在猜想是不是书上例子过时了的原因,我的环境是:python 3.4, tornado 4.1.dev1
    有哪位能帮忙看下么?代码倒是照着书上敲的

    目录结构:
    Long Polling/
    |_shopping_cart.py
    |_static/
    |_ _|_scripts/
    |_ _ _|_inventory.js
    |_templates/
    |_ _|_index.html
    5 replies    2015-01-24 01:59:56 +08:00
    zjxubinbin
        1
    zjxubinbin  
       Jan 23, 2015
    你好歹把代码放到github上面呀,看不见代码我们跟你说个鸟???
    fanta
        2
    fanta  
       Jan 23, 2015
    嗯,贴个代码, 看看是不是写错了.
    jecvay
        3
    jecvay  
       Jan 23, 2015 via Android
    也是醉了。。。
    pagict
        4
    pagict  
    OP
       Jan 24, 2015
    @zjxubinbin
    @fanta
    @jecvay
    其实我上面的意思是 对着书上的代码检查了几遍了感觉一样
    好吧 还是在github上创建了一个 repo,今天出差一直没来得及放
    麻烦求救,这个问题弄了好几天了


    https://github.com/pagict/question
    pagict
        5
    pagict  
    OP
       Jan 24, 2015
    @zjxubinbin
    @fanta
    @jecvay
    哈 终于自己还是搞定了 谢谢三位的鞭策驱动 ^.^
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3368 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 45ms · UTC 11:21 · PVG 19:21 · LAX 04:21 · JFK 07:21
    ♥ Do have faith in what you're doing.