documentation for env var prefix; allow passing in the prefix through the app constructor

This commit is contained in:
Tim Mundt
2017-09-05 10:41:55 +02:00
parent c59a8a60eb
commit 97d8b9e908
2 changed files with 10 additions and 3 deletions

View File

@@ -131,7 +131,8 @@ class Config(dict):
self.GRACEFUL_SHUTDOWN_TIMEOUT = 15.0 # 15 sec
if load_env:
self.load_environment_vars()
prefix = SANIC_PREFIX if load_env == True else load_env
self.load_environment_vars(prefix=load_env)
def __getattr__(self, attr):
try: