diff --git a/go3/settings.py b/go3/settings.py index a3be8d16..966ea15b 100644 --- a/go3/settings.py +++ b/go3/settings.py @@ -90,6 +90,7 @@ "agenda.apps.AgendaConfig", "stats.apps.StatsConfig", "widget_tweaks", + "debug_toolbar", "django.contrib.admin", "django.contrib.auth", "django.contrib.contenttypes", @@ -116,6 +117,7 @@ "django.contrib.messages.middleware.MessageMiddleware", "django.middleware.clickjacking.XFrameOptionsMiddleware", "go3.rollbar_middleware.GigORollbarNotifierMiddleware", + "debug_toolbar.middleware.DebugToolbarMiddleware", ] ROOT_URLCONF = "go3.urls" @@ -342,3 +344,11 @@ ]), } } + +INTERNAL_IPS = [ + "127.0.0.1", +] + +DEBUG_TOOLBAR_CONFIG = { + "ROOT_TAG_EXTRA_ATTRS": "hx-preserve" +} \ No newline at end of file diff --git a/go3/urls.py b/go3/urls.py index 7cf80618..4c3aba0a 100644 --- a/go3/urls.py +++ b/go3/urls.py @@ -57,6 +57,7 @@ path('migration/', include('migration.urls')), path('graphql', PrivateGraphQLView.as_view(graphiql=True, schema=schema)), path('404',test404.as_view()), + path("__debug__/", include("debug_toolbar.urls")), path('jsi18n/', JavaScriptCatalog.as_view(), name="javascript-catalog"), # Backward compatibility with old GO2 cal feed path('cal/m/', go2_id_calfeed), diff --git a/requirements.txt b/requirements.txt index d33e497a..974beaf6 100644 --- a/requirements.txt +++ b/requirements.txt @@ -12,6 +12,7 @@ decorator==5.0.9 dill==0.3.8 Django==4.2.15 django-crispy-forms==1.12.0 +django-debug-toolbar==4.3.0 django-environ==0.11.2 django-extensions==3.1.3 django-markdownify==0.9.3