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

Flask的问题

  •  
  •   shinerene ·
    Xiechen · Apr 29, 2013 · 4077 views
    This topic created in 4905 days ago, the information mentioned may be changed or developed.
    请问有人用Flask么 我刚刚在学 请问Flask的g是干什么用得?
    6 replies  •  1970-01-01 08:00:00 +08:00
    bigeagle
        1
    bigeagle  
       Apr 29, 2013
    是一个thread local的全局变量
    shinerene
        2
    shinerene  
    OP
       Apr 29, 2013
    @bigeagle 额 能不能再说的具体点呢。。我看到一句是g.user比如说这句是做什么用的呢 ?
    zhy0216
        3
    zhy0216  
       Apr 29, 2013
    @shinerene g就理解成一个全局的变量, 你可以往里面存东西~~
    shinerene
        4
    shinerene  
    OP
       Apr 29, 2013
    @zhy0216 哦哦~这样啊~
    还想请问个问题 request是怎么用的呢?
    再看flask的文档 可是很多查找不是很方便呢 不像python官方文档有专门的lib库的pdf
    zhy0216
        5
    zhy0216  
       Apr 29, 2013
    @shinerene 把文档先粗略的读一遍吧, 然后哪里有问题哪里查~
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   825 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 22:54 · PVG 06:54 · LAX 15:54 · JFK 18:54
    ♥ Do have faith in what you're doing.