Update config (#1903)
* New aproach for uploading sanic app config. * Update config.rst Co-authored-by: tigerthelion <bjt.thompson@gmail.com> Co-authored-by: Adam Hopkins <admhpkns@gmail.com>
This commit is contained in:
10
sanic/app.py
10
sanic/app.py
@@ -1452,3 +1452,13 @@ class Sanic:
|
||||
self.asgi = True
|
||||
asgi_app = await ASGIApp.create(self, scope, receive, send)
|
||||
await asgi_app()
|
||||
|
||||
# -------------------------------------------------------------------- #
|
||||
# Configuration
|
||||
# -------------------------------------------------------------------- #
|
||||
def update_config(self, config: Union[bytes, str, dict, Any]):
|
||||
"""Update app.config.
|
||||
|
||||
Please refer to config.py::Config.update_config for documentation."""
|
||||
|
||||
self.config.update_config(config)
|
||||
|
||||
Reference in New Issue
Block a user