Geen omschrijving
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

confspecs.py 1.2KB

1234567891011121314151617181920212223242526272829303132
  1. from lodel.context import LodelContext
  2. LodelContext.expose_modules(globals(), {
  3. 'lodel.settings.validator': ['SettingValidator']})
  4. #Define a minimal confspec used by multisite loader
  5. LODEL2_CONFSPECS = {
  6. 'lodel2': {
  7. 'debug': (True, SettingValidator('bool'))
  8. },
  9. 'lodel2.server': {
  10. 'listen_address': ('', SettingValidator('dummy')),
  11. #'listen_address': ('', SettingValidator('ip')), #<-- not implemented
  12. 'listen_port': ( 1337, SettingValidator('int')),
  13. 'max_children': (40, SettingValidator('int')),
  14. },
  15. 'lodel2.logging.*' : {
  16. 'level': ( 'ERROR',
  17. SettingValidator('loglevel')),
  18. 'context': ( False,
  19. SettingValidator('bool')),
  20. 'filename': ( None,
  21. SettingValidator('errfile', none_is_valid = True)),
  22. 'backupcount': ( 10,
  23. SettingValidator('int', none_is_valid = False)),
  24. 'maxbytes': ( 1024*10,
  25. SettingValidator('int', none_is_valid = False)),
  26. },
  27. 'lodel2.datasources.*': {
  28. 'read_only': (False, SettingValidator('bool')),
  29. 'identifier': ( None, SettingValidator('string')),
  30. }
  31. }