Django Settings Splitter & Local Settings loader

I tried to find any cool settings loader, but have no luck.I created this one myself.

Ok, we forgetting about settings.py and creating module settings (folder named settings with file __init__.py).

This __init__.py file have preloader for modules placed in settings folder and ../settings_local.py (if exists) at the end. settings_local is awesome tool, when you use any VCS like git and have settings in vcs, but for example you have different database connection settings. You can change this settings in settings_local.

Settings splitter have variable moduleweights. This variable declares weights for selected modules to allow loader sort modules by priority and use already defined settings in each other loaded module. You can define your custom modules and weights there.

Ok, now few examples.

settings/env.py

import os
# Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/1.6/howto/deployment/checklist/
DEBUG = not 'http/ask.helldude.ru/' in os.path.realpath(__file__)