There are a number of configuration settings for your mycomapny/settings.py
file, but there are only four main ones we need to work out with to configure the Django template system: DEBUG
, TEMPLATE_DEBUG
, TEMPLATE_LOADERS
, and TEMPLATE_DIRS
.
DEBUG
The DEBUG
setting tells Django to run in debugging mode, enabling diagnostic information to be displayed in the browser when errors occur. These error messages can be very helpful for tracking down errors and bugs.
Here's how it should look in your mycompany/settings.py
file:
DEBUG = True
TEMPLATE_DEBUG = True
When debugging is turned off, errors will be displayed using a friendly error template instead of showing the diagnostic information that you wouldn't want general users to see. By default, Django hides the most sensitive settings. But there are still bits of information you probably don't want the users to see.