diff --git a/flask/config.py b/flask/config.py index d6074baa..50343801 100644 --- a/flask/config.py +++ b/flask/config.py @@ -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