Movatterモバイル変換


[0]ホーム

URL:


Skip to content
DEV Community
Log in Create account

DEV Community

qiudaozhang
qiudaozhang

Posted on

     

masonite关于debugger

安装

pipinstallmasonite-debugbar
Enter fullscreen modeExit fullscreen mode

使用

config/providers.py 文件修改

fromdebugbar.providersimportDebugProviderPROVIDERS=[....DebugProvider]
Enter fullscreen modeExit fullscreen mode

不过上线的时候也这样就不好了,会暴露敏感信息,所以改造一下

fromdebugbar.providersimportDebugProvider# 如果不是生产环境,不要开启debug,即便安装了插件,也不会暴露敏感信息if(env("APP_ENV")!='prod'):PROVIDERS.append(DebugProvider)
Enter fullscreen modeExit fullscreen mode

这样即便打开了这个工具,也看不到信息

效果1

Top comments(0)

Subscribe
pic
Create template

Templates let you quickly answer FAQs or store snippets for re-use.

Dismiss

Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment'spermalink.

For further actions, you may consider blocking this person and/orreporting abuse

  • Location
    China
  • Joined

More fromqiudaozhang

DEV Community

We're a place where coders share, stay up-to-date and grow their careers.

Log in Create account

[8]ページ先頭

©2009-2025 Movatter.jp