3 ms·
With a single settings file how do you handle things that should only ever be configured in a specific environment? Django debug toolbar for example for a deve
by scwoodal 5y ago
With a single settings file how do you handle things that should only ever be configured in a specific environment?
Django debug toolbar for example for a development environment? It needs to be listed as an installed app.
Or something specific to tests when the CI/CD pipeline is running the test suite.
- VWWHFSfQ 5y agoThe Django Debug Toolbar has a SHOW_TOOLBAR_CALLBACK setting that you can give a dotted import path to a function that returns True/False whether it should be enabled or not. By default it just looks at settings.DEBUG. Other configurations work the same way.