qiudaozhang
Posted on June 11, 2022
安装
pip install masonite-debugbar
使用
config/providers.py
文件修改
from debugbar.providers import DebugProvider
PROVIDERS = [
....
DebugProvider
]
不过上线的时候也这样就不好了,会暴露敏感信息,所以改造一下
from debugbar.providers import DebugProvider
# 如果不是生产环境,不要开启debug,即便安装了插件,也不会暴露敏感信息
if (env("APP_ENV") != 'prod'):
PROVIDERS.append(DebugProvider)
这样即便打开了这个工具,也看不到信息
💖 💪 🙅 🚩
qiudaozhang
Posted on June 11, 2022
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.