Repository Details
Shared by
HelloGitHub Rating
0 ratings
Free•BSD-3-Clause
Claim
Discuss
Collect
Share
8.1k
Stars
No
Chinese
Python
Language
Yes
Active
271
Contributors
65
Issues
Yes
Organization
5.0.0-alpha
Latest
1k
Forks
BSD-3-Clause
License
More
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