summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRyan Petrello <lists@ryanpetrello.com>2014-03-17 09:12:38 -0400
committerRyan Petrello <lists@ryanpetrello.com>2014-03-18 15:54:29 -0700
commit9b15e68740cba443ff5d24d7f6bc542c0aa4a243 (patch)
tree6e1f0595a0ab46b1cbb5a27e1e91bdaa624f7922
parentc047087b72d37f094320e3bdff3fc24a79551ea8 (diff)
downloadpecan-9b15e68740cba443ff5d24d7f6bc542c0aa4a243.tar.gz
Document another configuration use case for the use of `__force_dict__`.
Change-Id: I74ab3b38adad456440df728d54843bbcbbad1ee3 Fixes bug: 1293545
-rw-r--r--docs/source/configuration.rst18
1 files changed, 12 insertions, 6 deletions
diff --git a/docs/source/configuration.rst b/docs/source/configuration.rst
index 1118c72..d1f9f83 100644
--- a/docs/source/configuration.rst
+++ b/docs/source/configuration.rst
@@ -182,13 +182,14 @@ string argument if you need to prefix the keys in the returned dictionary.
{'prefixed_app': {'prefixed_errors': {}, 'prefixed_template_path': '', 'prefixed_static_root': 'prefixed_public', [...]
-Dotted Keys and Native Dictionaries
------------------------------------
+Dotted Keys, Non-Python Idenfitiers, and Native Dictionaries
+------------------------------------------------------------
-Sometimes you want to specify a configuration option that includes dotted keys.
-This is especially common when configuring Python logging. By passing
-a special key, ``__force_dict__``, individual configuration blocks can be
-treated as native dictionaries.
+Sometimes you want to specify a configuration option that includes dotted keys
+or is not a valid Python idenfitier, such as ``()``. These situations are
+especially common when configuring Python logging. By passing a special key,
+``__force_dict__``, individual configuration blocks can be treated as native
+dictionaries.
::
@@ -197,6 +198,11 @@ treated as native dictionaries.
'root': {'level': 'INFO', 'handlers': ['console']},
'sqlalchemy.engine': {'level': 'INFO', 'handlers': ['console']},
'__force_dict__': True
+ },
+ 'formatters': {
+ 'custom': {
+ '()': 'my.package.customFormatter'
+ }
}
}