[Django] django-debug-toolbar 설치하기
1. django-debug-toolbar 설치
pip install django-debug-toolbar
2. settings.py 설정
INSTALLED_APPS = [
# 생략
'django.contrib.staticfiles',
'debug_toolbar',
]
MIDDLEWARE = [
# 생략
'debug_toolbar.middleware.DebugToolbarMiddleware',
]
INTERNAL_IPS = [
'127.0.0.1',
]
3. urls.py 설정
from django.conf import settings
from django.urls import include, path
urlpatterns = [
# 생략
]
if settings.DEBUG:
import debug_toolbar
urlpatterns += [
path('__debug__/', include(debug_toolbar.urls)),
]
'Python' 카테고리의 다른 글
Python 사용하여 Youtube 영상에서 MP3 추출하기 (CentOS 8) (0) | 2020.07.30 |
---|---|
jupyter-notebook python3.8 notimplementederror (0) | 2020.01.13 |
파이썬 주요 라이브러리 (bs4, pymysql, selenium) 설치 (0) | 2018.03.21 |
CentOS 7 파이썬 3.* 설치 (0) | 2018.03.20 |
pymysql 에러 (0) | 2017.12.07 |