Repository Details
Shared by![navbar_avatar](https://img.hellogithub.com/avatar/oTtM-5_ebfppwwUHOebKp8KT7EMc.png)
![navbar_avatar](https://img.hellogithub.com/avatar/oTtM-5_ebfppwwUHOebKp8KT7EMc.png)
![repo_avatar](https://img.hellogithub.com/github_avatar/15129049.png)
HelloGitHub Rating
0 ratings
Free•BSD-3-Clause
Claim
Discuss
Collect
Share
8.2k
Stars
No
Chinese
Python
Language
Yes
Active
273
Contributors
70
Issues
Yes
Organization
5.0.1
Latest
1k
Forks
BSD-3-Clause
License
More
![django-debug-toolbar image](https://img.hellogithub.com/i/mT9zgiIXoPuNJrl.png)
Django 的调试工具栏。可显示当前请求和响应有关的各种调试信息,包括耗时、SQL、配置、性能等信息
```
1. 安装:pip install django-debug-toolbar
2. TEMPLATES = [
{
"BACKEND": "django.template.backends.django.DjangoTemplates",
"APP_DIRS": True,
# ...
}
]
3. INSTALLED_APPS = [
# ...
"debug_toolbar",
"django.contrib.staticfiles",
# ...
]
4. 增加 __debug__ URL
import debug_toolbar
from django.urls import include, path
urlpatterns = [
# ...
path('__debug__/', include(debug_toolbar.urls)),
]
5. MIDDLEWARE = [
# ...
"debug_toolbar.middleware.DebugToolbarMiddleware",
# ...
]
6. INTERNAL_IPS = [
# ...
"127.0.0.1",
# ...
]
```
Comments
Rating:
No comments yet