Debug Jinja2 in Google App Engine

前端 未结 6 1526
执笔经年
执笔经年 2020-12-13 02:24

When I\'m running Jinja2 in Google App Engine, I get useless debugging information. I gather this is because of this item in the FAQ:

My tracebacks l

6条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-13 03:10

    A way to avoid monkey-patching (which depends on the changing internals of the SDK) is to use the imp module, which is at least currently not disabled in the local development environment. Then just load _ctypes like this to enable better Jinja2 debugging:

    import imp
    file, pathname, description =  imp.find_module('_ctypes')
    imp.load_module('_ctypes', file, pathname, description)
    

提交回复
热议问题