Repository Details
Shared by
HelloGitHub Rating
0 ratings
用于 Django 的调试工具栏
Past 7 days Received -2 stars ✨
Use arrow keys to explore dates, Home and End for the first and last date, Escape to dismiss.| Date | Star | Daily change |
|---|---|---|
| 周二 | 8,380 | — |
| 周三 | 8,380 | 0 |
| 周四 | 8,380 | 0 |
| 周五 | 8,379 | -1 |
| 周六 | 8,378 | -1 |
| 周日 | 8,378 | 0 |
| 周一 | 8,378 | 0 |
8.4k
Stars
No
Chinese
Python
Language
Yes
Active
348
Contributors
71
Issues
Yes
Organization
None
Latest
1k
Forks
BSD-3-Clause
License

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