Django Settings Accessing settings


Once you've got all your settings, you'll want to use them in your code. To do so, add the following import to your file:

from django.conf import settings

You may then access your settings as attributes of the settings module, for example:

if not settings.DEBUG:
    email_user(user, message)