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.4KB

12345678910111213141516171819202122232425262728293031323334
  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': ('127.0.0.1', SettingValidator('dummy')),
  11. #'listen_address': ('', SettingValidator('ip')), #<-- not implemented
  12. 'listen_port': ( 1337, SettingValidator('int')),
  13. 'uwsgi_workers': (8, SettingValidator('int')),
  14. 'uwsgicmd': ('/usr/bin/uwsgi', SettingValidator('dummy')),
  15. 'virtualenv': (None, SettingValidator('path', none_is_valid = True)),
  16. },
  17. 'lodel2.logging.*' : {
  18. 'level': ( 'ERROR',
  19. SettingValidator('loglevel')),
  20. 'context': ( False,
  21. SettingValidator('bool')),
  22. 'filename': ( None,
  23. SettingValidator('errfile', none_is_valid = True)),
  24. 'backupcount': ( 10,
  25. SettingValidator('int', none_is_valid = False)),
  26. 'maxbytes': ( 1024*10,
  27. SettingValidator('int', none_is_valid = False)),
  28. },
  29. 'lodel2.datasources.*': {
  30. 'read_only': (False, SettingValidator('bool')),
  31. 'identifier': ( None, SettingValidator('string')),
  32. }
  33. }