|
|
|
@ -156,6 +156,14 @@ class Config(dict):
|
|
|
|
|
from yourapplication import default_config |
|
|
|
|
app.config.from_object(default_config) |
|
|
|
|
|
|
|
|
|
Note that the object is *not* called / instantiated. If you need to |
|
|
|
|
use an attribute of the object instance, such as an @property, |
|
|
|
|
then instantiate the object manually before sending to this function:: |
|
|
|
|
|
|
|
|
|
my_obj = DefaultConfig() |
|
|
|
|
app.config.from_object(my_obj) |
|
|
|
|
app.config.from_object(DifferentConfig()) |
|
|
|
|
|
|
|
|
|
You should not use this function to load the actual configuration but |
|
|
|
|
rather configuration defaults. The actual config should be loaded |
|
|
|
|
with :meth:`from_pyfile` and ideally from a location not within the |
|
|
|
|