Configuring the application

To configure our project or our application, we need to edit the settings.py file in the project folder.

This file contains variables. These variables are the settings that Django reads when initializing the web app. The following are a few of these variables:

  • DEBUG: This parameter must be set to True throughout the duration of development because it is the one that enables the errors to be displayed. Do not forget to set it to False when putting the project into production, because an error gives very sensitive information about the site security.
  • TIME_ZONE: This parameter sets the region referring to which it must calculate dates and times. The default is UTC.
  • DEFAULT_CHARSET: This sets the character encoding used. On ...

Get Django: Web Development with Python now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.