24
|
1 |
# vim: set expandtab tabstop=4 shiftwidth=4:
|
|
2 |
## encoding: utf-8
|
|
3 |
|
|
4 |
import os, glob
|
|
5 |
|
|
6 |
# Import common settings
|
|
7 |
from cmpuqrct.settings.base import *
|
|
8 |
|
|
9 |
# Load additional configuration from etc/settings.d/*.py
|
|
10 |
ETC_PATH = './etc/settings.d'
|
|
11 |
|
|
12 |
if os.path.exists(ETC_PATH) :
|
25
|
13 |
for config in glob.glob(os.path.join(ETC_PATH, '*.py')) :
|
24
|
14 |
execfile(config)
|
|
15 |
else :
|
|
16 |
# use default configuration
|
|
17 |
from cmpuqrct.settings.default import *
|
|
18 |
|
|
19 |
# Validate
|
|
20 |
if not SECRET_KEY :
|
|
21 |
raise Exception("Invalid cmpuqrct.settings: SECRET_KEY")
|