Notice
Recent Posts
Recent Comments
Link
| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 1 | 2 | 3 | 4 | 5 | 6 | |
| 7 | 8 | 9 | 10 | 11 | 12 | 13 |
| 14 | 15 | 16 | 17 | 18 | 19 | 20 |
| 21 | 22 | 23 | 24 | 25 | 26 | 27 |
| 28 | 29 | 30 | 31 |
Tags
- amazon q
- AWS
- mcponaws
- AI
- Spark
- ubuntu
- json
- SCALA APP
- devops
- coding with ai
- ai assistant
- 툴바안뜸
- Transit Gateway
- django
- list
- AWSKRUG
- MongoDB
- debug toolbar
- git
- nosql
- Python
- pyspark
- debug_toolbar
- Amazon
- tgw
- Eclipse
- VPC
- django-debug-toolbar
Archives
- Today
- Total
STACKBASE
[Django] debug toolbar 설치 본문
반응형
1. pip를 이용한 설치
python -m pip install django-debug-toolbar
2. Django project > settings.py 설정
# 1. APP 추가
INSTALLED_APPS = [
# ...
"django.contrib.staticfiles",
"debug_toolbar",
]
# 2. Templates 설정 확인
TEMPLATES = [
{
"BACKEND": "django.template.backends.django.DjangoTemplates",
"APP_DIRS": True,
# ...
}
]
# 3. MiddleWare 추가
MIDDLEWARE = [
# ...
"debug_toolbar.middleware.DebugToolbarMiddleware",
# ...
]
# 4. Debug 허용 IP 등록
INTERNAL_IPS = [
# ...
"127.0.0.1",
# ...
]
3. Django project > urls.py 설정
from django.urls import include, path
urlpatterns = [
# ...
path('__debug__/', include('debug_toolbar.urls')),
]
4. 참고 : https://django-debug-toolbar.readthedocs.io/en/latest/installation.html
반응형
'프로그래밍 > Django' 카테고리의 다른 글
| [Django] 장고 쉘! (0) | 2022.02.21 |
|---|---|
| [Django] admin을 통한 데이터 관리 (0) | 2022.02.17 |
| [Django] 장고 소개 (0) | 2022.02.16 |
| [Django] debug toolbar 오류 Fix (0) | 2022.01.28 |