No Description
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.5KB

1234567891011121314151617181920212223242526272829303132333435363738
  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.lodelsites': {
  10. 'name': (None,
  11. SettingValidator('string', none_is_valid = False)), #Bad validator
  12. 'lodelsites_emfile': (None,
  13. SettingValidator('string', none_is_valid = False)), #Bad validator
  14. 'lodelsites_emtranslator': ('picklefile',
  15. SettingValidator('strip', none_is_valid = False)), #Bad validator
  16. 'sites_emfile': (None,
  17. SettingValidator('string', none_is_valid = False)), #Bad validator
  18. 'sites_emtranslator': ('picklefile',
  19. SettingValidator('string', none_is_valid = False)), #Bad validator
  20. },
  21. 'lodel2.logging.*' : {
  22. 'level': ( 'ERROR',
  23. SettingValidator('loglevel')),
  24. 'context': ( False,
  25. SettingValidator('bool')),
  26. 'filename': ( None,
  27. SettingValidator('errfile', none_is_valid = True)),
  28. 'backupcount': ( 10,
  29. SettingValidator('int', none_is_valid = False)),
  30. 'maxbytes': ( 1024*10,
  31. SettingValidator('int', none_is_valid = False)),
  32. },
  33. 'lodel2.datasources.*': {
  34. 'read_only': (False, SettingValidator('bool')),
  35. 'identifier': ( None, SettingValidator('string')),
  36. }
  37. }