django-debug-tools 的panel中会增加一项Memory的按钮,点击就能看到内存使用的情况了。 其中一个问题是debug-toolbar需要jquery支持,在debug-toolbar的settings里定义了这么一句话: 'JQUERY_URL': '//ajax.googleapis.com/ajax/libs/jquery/2.1.0/jquery.min.js’,...
1.包安装 pip install django-debug-toolbar pip install django-debug-panel (辅助包) 2.配置 settings新增配置 ifDEBUG: INTERNAL_IPS= ('127.0.0.1',) INSTALLED_APPS+=['debug_toolbar','debug_panel','pympler'#用于监控内存] MIDDLEWARE= ['debug_panel.middleware.DebugPanelMiddleware'] +MIDDLEWARE DEB...
As of Django 1.9, either use{% load debugtools_tags %}or add the following to the settings: TEMPLATES=[ {'BACKEND':'django.template.backends.django.DjangoTemplates','DIRS': [],'APP_DIRS':True,'OPTIONS': {'context_processors': ['django.template.context_processors.debug','django.template....
'debug_toolbar', # 添加debug ] 添加MIDDLEWARE 1 2 3 4 5 6 7 8 9 10 MIDDLEWARE = [ 'django.middleware.security.SecurityMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.common.CommonMiddleware', #'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib....