config: replace cam by cud ...
This commit is contained in:
parent
9067de7dfe
commit
a135ce4115
|
@ -7,14 +7,14 @@ from mandaye.exceptions import ImproperlyConfigured
|
|||
# get configuration files from :
|
||||
# 1. default-settings.ini from source code
|
||||
# 2. os.environ.get('SETTINGS_INI') if it exists
|
||||
# else /etc/mandaye-cam/config.ini
|
||||
# and then /etc/mandaye-cam/local-config.ini
|
||||
# else /etc/mandaye-cud/config.ini
|
||||
# and then /etc/mandaye-cud/local-config.ini
|
||||
BASE_DIR = os.path.dirname(os.path.abspath(__file__))
|
||||
SETTINGS_INI = (os.path.join(BASE_DIR, 'default-config.ini'),)
|
||||
if os.environ.get('SETTINGS_INI'):
|
||||
SETTINGS_INI += (os.environ.get('SETTINGS_INI'),)
|
||||
else:
|
||||
ETC_DIR = os.path.join('/', 'etc', 'mandaye-cam')
|
||||
ETC_DIR = os.path.join('/', 'etc', 'mandaye-cud')
|
||||
SETTINGS_INI += (
|
||||
os.path.join(ETC_DIR, 'config.ini'),
|
||||
os.path.join(BASE_DIR, 'local-config.ini')
|
||||
|
@ -71,7 +71,7 @@ LOGGING = {
|
|||
'level': 'INFO',
|
||||
'propagate': False,
|
||||
},
|
||||
'cam': {
|
||||
'mandaye_cud': {
|
||||
'handlers': ['console', 'syslog'],
|
||||
'level': 'INFO',
|
||||
'propagate': False,
|
||||
|
@ -82,7 +82,7 @@ LOGGING = {
|
|||
if config.getboolean('debug', 'log_debug'):
|
||||
LOGGING['loggers']['']['level'] = 'DEBUG'
|
||||
LOGGING['loggers']['mandaye']['level'] = 'DEBUG'
|
||||
LOGGING['loggers']['cam']['level'] = 'DEBUG'
|
||||
LOGGING['loggers']['mandaye_cud']['level'] = 'DEBUG'
|
||||
|
||||
## PATH
|
||||
# Configuration directory
|
||||
|
@ -168,7 +168,7 @@ session_opts = {
|
|||
|
||||
# Import local config
|
||||
try:
|
||||
from cam.local_config import *
|
||||
from mandaye_cud.local_config import *
|
||||
except ImportError, e:
|
||||
if not 'local_config' in e.args[0]:
|
||||
raise ImproperlyConfigured('Error while importing "local_config.py"')
|
||||
|
|
Reference in New Issue