diff options
| author | Chris McDonough <chrism@plope.com> | 2011-01-16 16:39:54 -0500 |
|---|---|---|
| committer | Chris McDonough <chrism@plope.com> | 2011-01-16 16:39:54 -0500 |
| commit | 314283a5bec3159d5a0c7e4d7028a0feecd47fa0 (patch) | |
| tree | 719d45ace13955d48288d2275bcac937699189b5 /docs/narr/advconfig.rst | |
| parent | 1386dbaeb27765ba4838b26cd8ad6f3e4104f7de (diff) | |
| download | pyramid-314283a5bec3159d5a0c7e4d7028a0feecd47fa0.tar.gz pyramid-314283a5bec3159d5a0c7e4d7028a0feecd47fa0.tar.bz2 pyramid-314283a5bec3159d5a0c7e4d7028a0feecd47fa0.zip | |
document 'includeme'
Diffstat (limited to 'docs/narr/advconfig.rst')
| -rw-r--r-- | docs/narr/advconfig.rst | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/docs/narr/advconfig.rst b/docs/narr/advconfig.rst index f8b3ee191..c983bbb57 100644 --- a/docs/narr/advconfig.rst +++ b/docs/narr/advconfig.rst @@ -338,6 +338,23 @@ Instead, use :meth:`pyramid.config.Configuration.include`: Using ``include`` rather than calling the function directly will allow :ref:`automatic_conflict_resolution` to work. +:meth:`pyramid.config.Configuration.include` can also accept a :term:`module` +as an argument: + +.. code-block:: python + :linenos: + + import myapp + + config.include(myapp) + +For this to work properly, the ``myapp`` module must contain a callable with +the special name ``includeme``, which should perform configuration (like the +``add_routes`` callable we showed above as an example). + +:meth:`pyramid.config.Configuration.include` can also accept a :term:`dotted +Python name` to a function or a module. + .. note: See :ref:`the_include_tag` for a declarative alternative to :meth:`pyramid.config.Configurator.include`. |
