V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
推荐学习书目
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
wang9571
V2EX  ›  Python

Flask 如何在关闭浏览器后保存登录状态

  •  
  •   wang9571 · 2017-06-22 14:04:56 +08:00 · 2347 次点击
    这是一个创建于 2513 天前的主题,其中的信息可能已经有所发展或是发生改变。

    按照《 Flask Web Development 》的内容,使用 Flask-Login,登录时勾选 remember_me 的情况下,重新打开浏览器后,只有在第一次打开"/"路径的时候登录状态还在。随便点击一个链接,登录状态就不见了。

    本来以为是自己代码写的有问题,直接 clone 书里提到的仓库 https://github.com/miguelgrinberg/flasky 在我电脑里也是不成功。

    1 条回复    2017-06-22 14:24:17 +08:00
    fangpeishi
        1
    fangpeishi  
       2017-06-22 14:24:17 +08:00   ❤️ 1
    会话 cookie 和持久性 cookie
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   3054 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 14:58 · PVG 22:58 · LAX 07:58 · JFK 10:58
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.