V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
Tornado Documentation
http://www.v2ex.com/tornado/
Tornado on GitHub
https://github.com/facebook/tornado/
Tornado Gists
http://tornadogists.org/
Livid
V2EX  ›  Tornado

生成 Tornado 所需的 cookie_secret 的办法

  •  
  •   Livid · 2011-05-06 19:29:57 +08:00 · 13620 次点击
    这是一个创建于 4710 天前的主题,其中的信息可能已经有所发展或是发生改变。
    import base64
    import uuid

    base64.b64encode(uuid.uuid4().bytes + uuid.uuid4().bytes)
    2 条回复    1970-01-01 08:00:00 +08:00
    meecle
        1
    meecle  
       2011-05-06 19:34:54 +08:00
    tornado 下的session 有没有简单快捷的 发法解决没?
    iwinux
        2
    iwinux  
       2011-05-06 19:41:56 +08:00
    Ruby,嘿嘿。

    ('A'..'z').to_a.shuffle[0..40].join
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   1199 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 18:13 · PVG 02:13 · LAX 11:13 · JFK 14:13
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.