diff options
| author | LV-426 <lv-426@taproot.org.il> | 2015-05-10 12:25:15 +0300 |
|---|---|---|
| committer | LV-426 <lv-426@taproot.org.il> | 2015-05-12 14:59:06 +0300 |
| commit | 631c21e556f14f911935dac9f34022e48385ebb3 (patch) | |
| tree | 518f6f1fe2cd744464821282f74be876b2246f2b /src/server | |
| parent | 81a0c4543161024f261dd70582a69ef1585b5ecb (diff) | |
rz_config: root_path, user_db_path, template_d_relpath handling:
- root_path default to os.getcwd()
- convert root_path, user_db_path to absolute form
Diffstat (limited to 'src/server')
| -rw-r--r-- | src/server/rz_config.py | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/src/server/rz_config.py b/src/server/rz_config.py index 79741d99..80e4b057 100644 --- a/src/server/rz_config.py +++ b/src/server/rz_config.py @@ -36,15 +36,13 @@ class RZ_Config(object): cfg['development_mode'] = False # - # defualt deployment places server under the following tree structure: - # . // root_dir_default - # └── bin - # └── rz_server.py + # - root_path: path to server root - relative paths are converted to absolute + # default: current working dir + # - user_db_path: user_db path - relative paths are converted to absolute + # - template_d_relpath: root_path relative location of template dir # - # - template_d_relpath: root_path relative path to template dir - # - root_dir_default = os.path.join(os.path.dirname(__file__), '..') - cfg['root_path'] = root_dir_default + cfg['root_path'] = os.getcwd() + cfg['user_db_path'] = './user_db.db' cfg['template_d_relpath'] = 'fragment.d/template.d' # client configuration @@ -92,7 +90,6 @@ class RZ_Config(object): cfg['access_control'] = True cfg['acl_wl__email_domain_set'] = None cfg['acl_wl__email_address_file_path'] = None - cfg['user_db_path'] = './user_db.db' cfg['signup_enabled'] = True # Neo4j connection @@ -155,9 +152,8 @@ class RZ_Config(object): # keys which are expected to be capitalized setattr(cfg, k, v) - # adjust paths - for path in ['config_dir', - 'root_path', + # use absolute paths for the following + for path in ['root_path', 'user_db_path']: path_value = getattr(cfg, path) if False == os.path.isabs(path_value): |
