"""
This module load settings from parent directory.
Also it allows to override settings with settings_local module.
"""
from os.path import dirname, realpath
import sys
from copy import deepcopy
__all__ = ['settings']
sys.path.append(dirname(dirname(realpath(__file__))))
from local import SiteConfig
settings = deepcopy(SiteConfig)
try:
from settings_local import patch
for key, value in patch.iteritems():
setattr(settings, key, value)
except ImportError:
pass