Django-Styleguide-Example
Django-Styleguide-Example copied to clipboard
DX: Django debug toolbar
The general idea is the following:
- We show the toolbar if we have it installed & we have it configured to be shown.
- This opens up the option to move the dependency as a local one, if one chooses to do so.
- This function acts as the single source of truth of that.
- No additional checks elsewhere are required.
This means we can have the following options possible:
- Show on a production environments.
- Exclude the entire dependency from production environments.
- Have the flexibility to control the debug toolbar via a single Django setting.
Additionally, we don't want to deal with the INTERNAL_IPS thing.