Can we have Flask error handlers in separate module

前端 未结 3 944
栀梦
栀梦 2021-02-08 04:24

We are migrating our Flask app from function based views to pluggable views, all working as expected, except the error handlers. I am trying to put all the error handlers in a s

3条回答
  •  失恋的感觉
    2021-02-08 04:55

    I think you import error_handlers module in routing.py as like

    import error_handlers
    

    Better you do import like following as in routing.py

    from error_handlers import *
    

    It could be help you:-)

提交回复
热议问题