The problem with putting logic in settings/__init__.py is that even if you explicitly specify a different settings file (e.g. settings.travis), __init__.py still gets loaded and executed when Python looks up the settings package.

What I've done before along those lines is

settings/
    - __init__.py  # empty as usual
    - default.py    # the logic to decide what other file to load
    - etc.py          # other settings file

then make the default be settings.default.