Refined settings.py and local_settings.py