document that Config.from_object uses object as-is

This commit is contained in:
Douglas Thor 2018-07-06 13:16:05 -07:00 committed by David Lord
parent ff56126a45
commit 830c77cb44
No known key found for this signature in database
GPG key ID: 7A1C87E3F5BC42A8
2 changed files with 42 additions and 0 deletions

View file

@ -156,6 +156,10 @@ class Config(dict):
from yourapplication import default_config
app.config.from_object(default_config)
Nothing is done to the object before loading. If the object is a
class and has ``@property`` attributes, it needs to be
instantiated before being passed to this method.
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