diff --git a/doc/topics/configuration.rst b/doc/topics/configuration.rst index cbd24484f0..458a2e8c60 100644 --- a/doc/topics/configuration.rst +++ b/doc/topics/configuration.rst @@ -645,6 +645,10 @@ Example:: [wsgi ie] kwargs={'fix_attach': False} +.. note:: + The options can be set using environment variables with names like: + ``TRYTOND_WSGI___``. + .. _JSON-RPC: http://en.wikipedia.org/wiki/JSON-RPC .. _XML-RPC: http://en.wikipedia.org/wiki/XML-RPC diff --git a/trytond/config.py b/trytond/config.py index 4974721ae6..b44032fe3f 100644 --- a/trytond/config.py +++ b/trytond/config.py @@ -106,6 +106,8 @@ class TrytonConfigParser(configparser.ConfigParser): section, option = key[len('TRYTOND_'):].lower().split('__', 1) except ValueError: continue + if section.startswith('wsgi_'): + section = section.replace('wsgi_', 'wsgi ') if not self.has_section(section): self.add_section(section) self.set(section, option, value)