This module load settings from parent directory Also it allows to over

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
"""
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