This adds support for django-debug-toolbar. This provides a collapsible sidebar (panels)on the right side of any HTML encoded response. Primarily, this will expose the ability to see the exact SQL query and timing data directly on an API endpoint.
This is enabled in production, but will only be visible by setting INTERNAL_IP environment variable to your client's IP (ex, your laptop is set to 192.168.1.100). This has not been tested with the many layers of proxies in our various prod environments, but I think it should work. Alternatively, I usually have a separate requirements.dev.txt that only installs the package, then in settings.py:
This method fully ensures the package is not even installed in production environments. Open to suggestions here, but INTERNAL_IPS should be sufficient.
Affected app(s)
Description of change
This adds support for django-debug-toolbar. This provides a collapsible sidebar (panels)on the right side of any HTML encoded response. Primarily, this will expose the ability to see the exact SQL query and timing data directly on an API endpoint.
This is enabled in production, but will only be visible by setting
INTERNAL_IP
environment variable to your client's IP (ex, your laptop is set to 192.168.1.100). This has not been tested with the many layers of proxies in our various prod environments, but I think it should work. Alternatively, I usually have a separaterequirements.dev.txt
that only installs the package, then insettings.py
:This method fully ensures the package is not even installed in production environments. Open to suggestions here, but
INTERNAL_IPS
should be sufficient.