https://www.cnblogs.com/sfencs-hcy/p/10989298.html

1.安装:pip install pympler 或 pip install -i https://pypi.tuna.tsinghua.edu.cn/simple pympler

2.配置:

  

DEBUG_TOOLBAR_PANELS = [   #debug_toolbar 面板显示设置
    # 'debug_toolbar.panels.versions.VersionsPanel', # 代表是哪个django版本
    'debug_toolbar.panels.timer.TimerPanel',# 用来计时的,判断加载当前页面总共花的时间
    # 'debug_toolbar.panels.settings.SettingsPanel', # 读取django中的配置信息
    'debug_toolbar.panels.headers.HeadersPanel', #看到当前请求头和响应头信息
    'debug_toolbar.panels.request.RequestPanel', #当前请求的想信息(视图函数,Cookie信息,Session信息等)
    'debug_toolbar.panels.sql.SQLPanel', # 查看SQL语句
    'debug_toolbar.panels.staticfiles.StaticFilesPanel',# 静态文件
    'debug_toolbar.panels.templates.TemplatesPanel',# 模板文件
    'debug_toolbar.panels.cache.CachePanel',# 缓存
    'debug_toolbar.panels.signals.SignalsPanel',# 信号
    'debug_toolbar.panels.logging.LoggingPanel',# 日志
    'debug_toolbar.panels.redirects.RedirectsPanel',# 重定向

    'pympler.panels.MemoryPanel'  #内存统计
]

 

  更多插件网址:https://django-debug-toolbar.readthedocs.io/en/stable/panels.html#third-party-panels

 

posted on 2020-07-26 09:52  大话人生  阅读(299)  评论(0编辑  收藏  举报