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
mgna17
V2EX  ›  Python

flask 返回 HTTP 423 的正确姿势是什么

  •  
  •   mgna17 · 2016-05-27 11:21:20 +08:00 · 2611 次点击
    这是一个创建于 2901 天前的主题,其中的信息可能已经有所发展或是发生改变。
    abort(423) 的时候出现了 “ LookupError: no exception for 423 ”
    这是说不支持返回 423 么?
    2 条回复    2016-05-27 11:37:06 +08:00
    cloverstd
        1
    cloverstd  
       2016-05-27 11:26:43 +08:00   ❤️ 1
    https://github.com/pallets/werkzeug/blob/master/werkzeug/exceptions.py

    不支持,但是可以用 werkzeug.exceptions.Aborter 自己造
    mgna17
        2
    mgna17  
    OP
       2016-05-27 11:37:06 +08:00
    @cloverstd 了解了,谢谢
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   5581 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 28ms · UTC 08:18 · PVG 16:18 · LAX 01:18 · JFK 04:18
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.