charasheet/src/charasheet/middleware.py
2023-01-29 13:04:13 +01:00

12 lines
369 B
Python

from django.conf import settings
def debug_toolbar_bypass_internal_ips(_) -> bool:
"""
Display debug toolbar according to the DEBUG_TOOLBAR setting only.
By default, DjDT is displayed according to an `INTERNAL_IPS` settings.
This is impossible to predict in a docker/k8s environment so we bypass this check.
"""
return settings.DEBUG_TOOLBAR