From 0f82511bb8107d102d5e4b8413760f42bf2d25c4 Mon Sep 17 00:00:00 2001 From: Jean-Marie Favreau Date: Fri, 31 Jan 2025 17:03:33 +0100 Subject: [PATCH] Ajout d'un profileur de templates --- src/agenda_culturel/settings/base.py | 20 ++++++++++++++++++++ src/requirements.txt | 3 ++- 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/src/agenda_culturel/settings/base.py b/src/agenda_culturel/settings/base.py index a10cd78..b1b3820 100644 --- a/src/agenda_culturel/settings/base.py +++ b/src/agenda_culturel/settings/base.py @@ -62,6 +62,7 @@ INSTALLED_APPS = [ "debug_toolbar", "cache_cleaner", "honeypot", + "template_profiler_panel", ] HONEYPOT_FIELD_NAME = "alias_name" @@ -283,3 +284,22 @@ LOGGING = { }, }, } + +# debug +DEBUG_TOOLBAR_PANELS = [ + 'debug_toolbar.panels.history.HistoryPanel', + 'debug_toolbar.panels.versions.VersionsPanel', + 'debug_toolbar.panels.timer.TimerPanel', + 'debug_toolbar.panels.settings.SettingsPanel', + 'debug_toolbar.panels.headers.HeadersPanel', + 'debug_toolbar.panels.request.RequestPanel', + 'debug_toolbar.panels.sql.SQLPanel', + 'debug_toolbar.panels.staticfiles.StaticFilesPanel', + 'debug_toolbar.panels.templates.TemplatesPanel', + 'debug_toolbar.panels.alerts.AlertsPanel', + 'debug_toolbar.panels.cache.CachePanel', + 'debug_toolbar.panels.signals.SignalsPanel', + 'debug_toolbar.panels.redirects.RedirectsPanel', + 'debug_toolbar.panels.profiling.ProfilingPanel', + "template_profiler_panel.panels.template.TemplateProfilerPanel", +] diff --git a/src/requirements.txt b/src/requirements.txt index ab25e54..a677f0b 100644 --- a/src/requirements.txt +++ b/src/requirements.txt @@ -44,4 +44,5 @@ django-debug-toolbar==4.4.6 django-cache-cleaner==0.1.0 emoji==2.14.0 django-honeypot==1.2.1 -django-autoslug==1.9.9 \ No newline at end of file +django-autoslug==1.9.9 +django-debug-toolbar-template-profiler==2.1.0 \ No newline at end of file