Appendix E. Settings

Your Django settings file contains all the configuration of your Django installation. This appendix explains how settings work and which settings are available.

Note

As Django grows, it's occasionally necessary to add or (rarely) change settings. You should always check the online settings documentation at http://www.djangoproject.com/documentation/0.96/settings/ for the latest information.

What's a Settings File?

A settings file is just a Python module with module-level variables. Here are a couple of example settings:

DEBUG = False
DEFAULT_FROM_EMAIL = 'webmaster@example.com'
TEMPLATE_DIRS = ('/home/templates/mike', '/home/templates/john')

Because a settings file is a Python module, the following apply:

  • It must be valid Python ...

Get The Definitive Guide to Django: Web Development Done Right now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.