Merge pull request #1436 from jotagesales/config_from_object_string
Config from object string
This commit is contained in:
@@ -53,6 +53,13 @@ import myapp.default_settings
|
||||
app = Sanic('myapp')
|
||||
app.config.from_object(myapp.default_settings)
|
||||
```
|
||||
or also by path to config:
|
||||
|
||||
```
|
||||
app = Sanic('myapp')
|
||||
app.config.from_object('config.path.config.Class')
|
||||
```
|
||||
|
||||
|
||||
You could use a class or any other object as well.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user