Django debug settings
Django has a number of settings that control the collection and presentation of debug information. The primary one is named DEBUG
; it broadly controls whether the server operates in development (if DEBUG
is True
) or production mode.
In development mode, the end-user is expected to be a site developer. Thus, if an error arises during processing of a request, it is useful to include specific technical information about the error in the response sent to the web browser. This is not useful in production mode, when the user is expected to be simply a general site user.
This section describes three Django settings that are useful for debugging during development. Additional settings are used during production to control what errors should be reported, and where error reports should be sent. These additional settings will be discussed in the section on handling problems in production.
The DEBUG and TEMPLATE_DEBUG settings
DEBUG
is the main debug setting. One of the most obvious...