Ei kuvausta
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.validator.validator import Validator
  2. #Define a minimal confspec used by multisite loader
  3. LODEL2_CONFSPECS = {
  4. 'lodel2': {
  5. 'debug': (True, Validator('bool'))
  6. },
  7. 'lodel2.server': {
  8. 'listen_address': ('127.0.0.1', Validator('dummy')),
  9. #'listen_address': ('', Validator('ip')), #<-- not implemented
  10. 'listen_port': ( 1337, Validator('int')),
  11. 'uwsgi_workers': (8, Validator('int')),
  12. 'uwsgicmd': ('/usr/bin/uwsgi', Validator('dummy')),
  13. 'virtualenv': (None, Validator('path', none_is_valid = True)),
  14. },
  15. 'lodel2.logging.*' : {
  16. 'level': ( 'ERROR',
  17. Validator('loglevel')),
  18. 'context': ( False,
  19. Validator('bool')),
  20. 'filename': ( None,
  21. Validator('errfile', none_is_valid = True)),
  22. 'backupcount': ( 10,
  23. Validator('int', none_is_valid = False)),
  24. 'maxbytes': ( 1024*10,
  25. Validator('int', none_is_valid = False)),
  26. },
  27. 'lodel2.datasources.*': {
  28. 'read_only': (False, Validator('bool')),
  29. 'identifier': ( None, Validator('string')),
  30. }
  31. }