[conf] fix default config

This commit is contained in:
Maxime Alves LIRMM@home 2020-07-28 09:54:29 +02:00
parent ad3792340c
commit 9e4c3506d5
1 changed files with 7 additions and 5 deletions

View File

@ -4,16 +4,18 @@ from os import environ
import sys
from configparser import ConfigParser
config = ConfigParser(defaults={
default_config = {
'project': {
'host': '127.0.0.1',
'port': '8000',
'secret': None,
'base_dir': None,
'production': False
'secret': ''
'base_dir': ''
'production': ''
}
}
})
config = ConfigParser()
config.read_dict(default_config)
config.read(filenames=['.halfapiconfig'])
PROJECT_NAME = config.get('project', 'name')