django

    [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", #..

    [Django] debug toolbar 오류 Fix

    [Django] debug toolbar 오류 Fix

    django-debug-toolbar를 설치하고 설정까지 완료하였는데 css,js 파일을 못찾겠다라는 오류가 뜨고, 크롬 개발자 모드에서 봤을때 Failed to load module script: Expected a JavaScript module script but the server responded with a MIME type of "text/plain". Strict MIME type checking is enforced for module scripts per HTML spec. 이러한 에러가 뜬다면 아래와 같이 조치하면된다. 1. 레지스트리 편집기 > 컴퓨터\HKEY_CLASSES_ROOT.js > Content Type > 값 데이터 > text/plain 에서 text/javascrip..