diff options
| author | Casey Duncan <casey.duncan@gmail.com> | 2011-01-17 12:00:37 -0700 |
|---|---|---|
| committer | Casey Duncan <casey.duncan@gmail.com> | 2011-01-17 12:00:37 -0700 |
| commit | bd3c7d796f940f8b7296631b8a3466fd00bc16f7 (patch) | |
| tree | 03547fa989487dee4df8e6fb70d45b9ee1f5f6ad /docs/narr/advconfig.rst | |
| parent | e849fee8351f77d1a2afd97748dd14e3603c47a8 (diff) | |
| parent | 566004501e8a28c0ba8f8c882ca5ea0742e5d285 (diff) | |
| download | pyramid-bd3c7d796f940f8b7296631b8a3466fd00bc16f7.tar.gz pyramid-bd3c7d796f940f8b7296631b8a3466fd00bc16f7.tar.bz2 pyramid-bd3c7d796f940f8b7296631b8a3466fd00bc16f7.zip | |
fix merge conflict
Diffstat (limited to 'docs/narr/advconfig.rst')
| -rw-r--r-- | docs/narr/advconfig.rst | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/docs/narr/advconfig.rst b/docs/narr/advconfig.rst index f8b3ee191..eb9b70b12 100644 --- a/docs/narr/advconfig.rst +++ b/docs/narr/advconfig.rst @@ -301,9 +301,6 @@ These are the methods of the configurator which provide conflict detection: Some other methods of the configurator also indirectly provide conflict detection, because they're implemented in terms of conflict-aware methods: -- :meth:`~pyramid.config.Configurator.add_handler`, a frontend for - ``add_route`` and ``add_view``. - - :meth:`~pyramid.config.Configurator.add_route` does a second type of conflict detection when a ``view`` parameter is passed (it calls ``add_view``). @@ -338,6 +335,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`. @@ -387,8 +401,7 @@ used, two-phase configuration is disabled, and configuration statements must be ordered in dependency order. Some configuration methods, such as -:meth:`pyramid.config.Configurator.add_route` and -:meth:`pyramid.config.Configurator.add_handler` have internal ordering +:meth:`pyramid.config.Configurator.add_route` have internal ordering constraints: they routes they imply require relative ordering. Such ordering constraints are not absolved by two-phase configuration. Routes are still added in configuration execution order. |
