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

Flask 部署到 heroku 用户无法用邮箱 confirmed?

  •  
  •   JohnLance · Jan 22, 2016 · 3728 views
    This topic created in 3899 days ago, the information mentioned may be changed or developed.

    业务逻辑是这样:
    用户注册后需要用邮箱 confirmed 。
    在本地一切 OK ,但是部署到 heroku 就无法 confirmed 。
    model 用单元测试一切通过的,百思不得其解,求助。。。
    代码太长了。
    具体请查看 https://segmentfault.com/q/1010000004350169

    4 replies  •  2016-01-23 12:07:35 +08:00
    julyclyde
        1
    julyclyde  
       Jan 22, 2016
    你到底要表达什么?
    发不出去,还是邮件点击回来不能执行?
    JohnLance
        2
    JohnLance  
    OP
       Jan 22, 2016
    @julyclyde 提交注册就会给用户发确认邮件,这里是已经发出去了,但是点击确认的 url 返回他不会设置 confirmed 为 True 。
    在本地一切正常的。
    julyclyde
        3
    julyclyde  
       Jan 22, 2016
    @JohnLance 那你尝试手工复制出链接,粘贴到浏览器访问一下。访问的时候请开启浏览器内置的调试窗口。如果粘贴网址访问成功,而邮件点击不成功,考虑一下 CSRF 保护方面的事。
    JohnLance
        4
    JohnLance  
    OP
       Jan 23, 2016
    @julyclyde 谢谢,我试一试
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   2506 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 28ms · UTC 12:13 · PVG 20:13 · LAX 05:13 · JFK 08:13
    ♥ Do have faith in what you're doing.