5 Commits

Author SHA1 Message Date
Konrad du Plessis
2731ac9ffd fix(dev): simplify Debug Toolbar wiring (review followups)
Three followups on 7075269:

- config/urls.py: drop dead try/except ImportError fallback.
  The settings.py gate already guarantees debug_toolbar is
  importable before we reach this line, so the except branch
  was unreachable and the re-import of include/path was
  redundant (both imported at top of file).

- config/settings.py: SHOW_TOOLBAR_CALLBACK now returns True
  unconditionally. The triple gate passed at settings-load time,
  so re-checking DEBUG and _IS_DEV inside the lambda was
  redundant. Comment corrected — the callback has nothing to
  do with "stale cached pages".

- requirements.txt: inline comment noting django-debug-toolbar
  is dev-only and gated.

No behavioural change. Tests: 68/68.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-24 00:55:44 +02:00
Konrad du Plessis
7075269a07 chore(dev): add Django Debug Toolbar (dev-only, DEBUG+USE_SQLITE gated)
Double-gated install: only loads when DEBUG=true AND USE_SQLITE=true,
never in prod. Lets us profile SQL query counts on the dashboard and
payroll pages before attacking N+1 hotspots.

requirements.txt adds django-debug-toolbar==6.0.0
config/settings.py conditionally appends to INSTALLED_APPS + MIDDLEWARE
config/urls.py conditionally includes __debug__ route

No behavioural change to production.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-24 00:47:19 +02:00
Flatlogic Bot
28c36a1e12 Ver 1.02 2026-02-22 12:55:15 +00:00
Flatlogic Bot
d10151cf40 Ver 01 2026-02-22 12:26:15 +00:00
Flatlogic Bot
d3fb8046d5 Initial version 2026-02-22 12:14:54 +00:00