Dica 8 - Conhecendo o Django Debug Toolbar
https://django-debug-toolbar.readthedocs.io/en/latest/
pip install django-debug-toolbar
Configurando o settings.py
settings.py
INSTALLED_APPS = [
# ...
'django.contrib.staticfiles',
# ...
'debug_toolbar',
]
MIDDLEWARE = [
# ...
'debug_toolbar.middleware.DebugToolbarMiddleware',
# Deve estar por último.
]
INTERNAL_IPS = [
# ...
'127.0.0.1',
# ...
]
STATIC_URL = '/static/'
Configurando o urls.py
urls.py
from django.conf import settings
from django.urls import include, path
if settings.DEBUG:
import debug_toolbar
urlpatterns = [
path('__debug__/', include(debug_toolbar.urls)),
] + urlpatterns
PreviousDica 7 - Rodando o ORM do Django no Jupyter NotebookNextDica 9 - Escondendo suas senhas python-decouple
Last updated
Was this helpful?