Django Local Settings

You can’t just add local_settings.py, you have to explicity import it.

At the very end of your settings.py, add this:

try:
    from local_settings import *
except ImportError:
    pass

The try/except block is there so that Python just ignores the case when you haven’t actually defined a local_settings file.

Leave a Comment