mirror of
https://github.com/yweber/lodel2.git
synced 2026-03-14 15:22:02 +01:00
Some modifications + tests update for settings loader
This commit is contained in:
parent
60f88dcf0c
commit
3ed55fdc29
10 changed files with 134 additions and 1 deletions
|
|
@ -59,6 +59,8 @@ PYTHON_SYS_LIB_PATH = '/usr/local/lib/python{major}.{minor}/'.format(
|
|||
#
|
||||
# @todo handles default sections for variable sections (sections ending with
|
||||
# '.*')
|
||||
# @todo delete the first stage, the lib path HAVE TO BE HARDCODED. In fact
|
||||
#when we will run lodel in production the lodel2 lib will be in the python path
|
||||
class Settings(object):
|
||||
|
||||
##@brief global conf specsification (default_value + validator)
|
||||
|
|
|
|||
|
|
@ -210,6 +210,8 @@ LODEL2_CONF_SPECS = {
|
|||
SettingValidator('bool')),
|
||||
'plugins': ( "",
|
||||
SettingValidator('list')),
|
||||
'sitename': ( 'noname',
|
||||
SettingValidator('strip')),
|
||||
},
|
||||
'lodel2.logging.*' : {
|
||||
'level': ( 'ERROR',
|
||||
|
|
@ -222,5 +224,17 @@ LODEL2_CONF_SPECS = {
|
|||
SettingValidator('int', none_is_valid = True)),
|
||||
'maxbytes': ( None,
|
||||
SettingValidator('int', none_is_valid = True)),
|
||||
},
|
||||
'lodel2.editorialmodel': {
|
||||
'emfile': ( 'em.pickle',
|
||||
SettingValidator('strip')),
|
||||
'emtranslator': ( 'picklefile',
|
||||
SettingValidator('strip')),
|
||||
'dyncode': ( 'leapi_dyncode.py',
|
||||
SettingValidator('strip')),
|
||||
'groups': ( '',
|
||||
SettingValidator('list')),
|
||||
'editormode': ( False,
|
||||
SettingValidator('bool')),
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue