[dev] add django debug toolbar to dev env

This commit is contained in:
bronsen 2025-03-13 19:54:19 +01:00
parent 470e690c61
commit c1383ca376
5 changed files with 12 additions and 3 deletions

View file

@ -1,4 +1,4 @@
DATABASE_URL=psql://teilchensammler:teilchensammler@localhost:5432/teilchensammler_test
DEBUG=On
SECRET_KEY=django-insecure-x=%#_wxu0h=d*m#seui9+mjh3vu7of8+4+gpwj@556.un0r1%.
DEV=On
DEV=Off

View file

@ -47,6 +47,7 @@ if env("DEV") is True:
INSTALLED_APPS.extend(
[
"django_extensions",
"debug_toolbar",
]
)
SHELL_PLUS = "ipython"
@ -60,6 +61,11 @@ MIDDLEWARE = [
"django.contrib.messages.middleware.MessageMiddleware",
"django.middleware.clickjacking.XFrameOptionsMiddleware",
]
if env("DEV") is True:
MIDDLEWARE.append("debug_toolbar.middleware.DebugToolbarMiddleware")
INTERNAL_IPS = [
"127.0.0.1",
]
ROOT_URLCONF = "config.urls"

View file

@ -17,8 +17,9 @@ Including another URLconf
from django.contrib import admin
from django.urls import include, path
from debug_toolbar.toolbar import debug_toolbar_urls
urlpatterns = [
path("collector/", include("collector.urls")),
path("admin/", admin.site.urls),
]
] + debug_toolbar_urls()

View file

@ -1,5 +1,6 @@
-r test.in
django-debug-toolbar
django-extensions
django-stubs
ipython

View file

@ -1,4 +1,4 @@
# SHA1:39149ea105722c1b0bd2fea274b35b595e3eab9a
# SHA1:0f71cd64a0fccc28bc97abcbc3c140da1b54b8e4
#
# This file is autogenerated by pip-compile-multi
# To update, run:
@ -10,6 +10,7 @@ asttokens==3.0.0
build==1.2.2.post1
click==8.1.8
decorator==5.2.1
django-debug-toolbar==5.0.1
django-extensions==3.2.3
django-stubs==5.1.3
django-stubs-ext==5.1.3