risotto/src/risotto/config.py

33 lines
1.2 KiB
Python
Raw Normal View History

2019-11-28 14:50:53 +01:00
MESSAGE_ROOT_PATH = 'messages'
2019-11-29 16:38:33 +01:00
DATABASE_DIR = 'database'
2019-12-02 10:29:40 +01:00
INTERNAL_USER = 'internal'
2019-12-02 14:22:40 +01:00
CONFIGURATION_DIR = 'configurations'
TEMPLATE_DIR = 'templates'
TMP_DIR = 'tmp'
2019-12-02 10:29:40 +01:00
ROUGAIL_DTD_PATH = '../rougail/data/creole.dtd'
2020-01-14 14:11:41 +01:00
DEFAULT_USER = 'Anonymous'
2019-12-02 10:45:07 +01:00
import os
from pathlib import PurePosixPath
CURRENT_PATH = PurePosixPath(__file__)
2019-12-02 10:45:07 +01:00
def get_config():
return {'database': {'host': 'localhost',
'port': 5432,
'dbname': 'risotto',
'user': 'risotto',
'password': 'risotto',
},
2020-01-14 14:11:41 +01:00
'http_server': {'port': 8080,
#'default_user': "gnunux"},
2020-01-14 14:11:41 +01:00
'default_user': DEFAULT_USER},
'global': {'message_root_path': CURRENT_PATH.parents[2] / 'messages',
'debug': True,
2019-12-02 10:45:07 +01:00
'internal_user': 'internal',
2020-01-14 14:11:41 +01:00
'check_role': True,
'rougail_dtd_path': '../rougail/data/creole.dtd',
'admin_user': DEFAULT_USER},
2019-12-20 10:17:37 +01:00
'source': {'root_path': '/srv/seed'},
'cache': {'root_path': '/var/cache/risotto'}
2019-12-02 10:45:07 +01:00
}