Add debug toolbar

This commit is contained in:
Mark Veidemanis 2022-09-05 07:20:30 +01:00
parent 8ae15ce9a4
commit ad4d24b3a0
Signed by: m
GPG Key ID: 5ACFCEED46C0904F
7 changed files with 16 additions and 2 deletions

View File

@ -35,17 +35,21 @@ INSTALLED_APPS = [
"django.contrib.sessions", "django.contrib.sessions",
"django.contrib.messages", "django.contrib.messages",
"django.contrib.staticfiles", "django.contrib.staticfiles",
"debug_toolbar",
"template_profiler_panel",
"django_htmx", "django_htmx",
"crispy_forms", "crispy_forms",
"crispy_bulma", "crispy_bulma",
"django_tables2", "django_tables2",
"django_tables2_bulma_template", "django_tables2_bulma_template",
] ]
CRISPY_TEMPLATE_PACK = "bulma" CRISPY_TEMPLATE_PACK = "bulma"
CRISPY_ALLOWED_TEMPLATE_PACKS = ("bulma",) CRISPY_ALLOWED_TEMPLATE_PACKS = ("bulma",)
DJANGO_TABLES2_TEMPLATE = "django-tables2/bulma.html" DJANGO_TABLES2_TEMPLATE = "django-tables2/bulma.html"
MIDDLEWARE = [ MIDDLEWARE = [
"debug_toolbar.middleware.DebugToolbarMiddleware",
"django.middleware.security.SecurityMiddleware", "django.middleware.security.SecurityMiddleware",
"django.contrib.sessions.middleware.SessionMiddleware", "django.contrib.sessions.middleware.SessionMiddleware",
"django.middleware.common.CommonMiddleware", "django.middleware.common.CommonMiddleware",
@ -139,6 +143,10 @@ REST_FRAMEWORK = {
] ]
} }
INTERNAL_IPS = [
"127.0.0.1",
]
from app.local_settings import * # noqa from app.local_settings import * # noqa
if PROFILER: # noqa - trust me its there if PROFILER: # noqa - trust me its there

View File

@ -73,6 +73,7 @@ from core.views.ui.insights import (
) )
urlpatterns = [ urlpatterns = [
path('__debug__/', include('debug_toolbar.urls')),
path("", DrilldownTableView.as_view(), name="home"), path("", DrilldownTableView.as_view(), name="home"),
path("search/", DrilldownTableView.as_view(), name="search"), path("search/", DrilldownTableView.as_view(), name="search"),
path("about/", About.as_view(), name="about"), path("about/", About.as_view(), name="about"),

View File

@ -1,5 +1,4 @@
{% load django_tables2 %} {% load django_tables2 %}
{% load i18n %}
{% load django_tables2_bulma_template %} {% load django_tables2_bulma_template %}
{% load static %} {% load static %}
{% load joinsep %} {% load joinsep %}

View File

@ -15,4 +15,4 @@ WORKDIR /code
COPY requirements.dev.txt /code/ COPY requirements.dev.txt /code/
RUN python -m venv /venv RUN python -m venv /venv
RUN . /venv/bin/activate && pip install -r requirements.dev.txt RUN . /venv/bin/activate && pip install -r requirements.dev.txt
CMD . /venv/bin/activate && exec python manage.py runserver 0.0.0.0:8000 CMD . /venv/bin/activate && exec python manage.py runserver --nothreading 0.0.0.0:8000

View File

@ -15,3 +15,5 @@ siphashc
redis redis
sortedcontainers sortedcontainers
manticoresearch manticoresearch
django-debug-toolbar
django-debug-toolbar-template-profiler

View File

@ -14,3 +14,5 @@ siphashc
redis redis
sortedcontainers sortedcontainers
manticoresearch manticoresearch
django-debug-toolbar
django-debug-toolbar-template-profiler

View File

@ -15,3 +15,5 @@ siphashc
redis redis
sortedcontainers sortedcontainers
manticoresearch manticoresearch
django-debug-toolbar
django-debug-toolbar-template-profiler