Compute messages root path against project root dir in development environment

This commit is contained in:
2019-12-20 10:15:38 +01:00
parent ddd97fb59c
commit b5ddefdaac
2 changed files with 9 additions and 4 deletions

View File

@ -10,6 +10,10 @@ ROUGAIL_DTD_PATH = '../rougail/data/creole.dtd'
POSTGRESQL_ADDRESS = '192.168.56.106'
POSTGRESQL_PORT = 5432
import os
from pathlib import PurePosixPath
CURRENT_PATH = PurePosixPath(__file__)
def get_config():
return {'database': {'host': 'localhost',
'port': 5432,
@ -18,10 +22,10 @@ def get_config():
'password': 'risotto',
},
'http_server': {'port': 8080},
'global': {'message_root_path': 'messages',
'global': {'message_root_path': CURRENT_PATH.parents[2] / 'messages',
'debug': DEBUG,
'internal_user': 'internal',
'rougail_dtd_path': '../rougail/data/creole.dtd'},
'source': {'root_path': '/srv/seed'},
'cache': {'root_path': '/var/cache/risotto'}
'source': {'root_path': '/home/bbohard/Cadoles/tmp/srv/seed'},
'cache': {'root_path': '/home/bbohard/Cadoles/tmp/var/cache/risotto'}
}