diff options
| author | Chris McDonough <chrism@agendaless.com> | 2009-01-25 19:14:34 +0000 |
|---|---|---|
| committer | Chris McDonough <chrism@agendaless.com> | 2009-01-25 19:14:34 +0000 |
| commit | 9a98308d994545aa620960f7c61cb5b80bee3331 (patch) | |
| tree | 459054ea9ac4cb3482fe21d968d385fd76528f30 /docs/narr/urldispatch.rst | |
| parent | 957132ae62528f63a9f7e806858bd1ea7394f778 (diff) | |
| download | pyramid-9a98308d994545aa620960f7c61cb5b80bee3331.tar.gz pyramid-9a98308d994545aa620960f7c61cb5b80bee3331.tar.bz2 pyramid-9a98308d994545aa620960f7c61cb5b80bee3331.zip | |
Root factory nomenclature.
Diffstat (limited to 'docs/narr/urldispatch.rst')
| -rw-r--r-- | docs/narr/urldispatch.rst | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/docs/narr/urldispatch.rst b/docs/narr/urldispatch.rst index 1e26aa52b..059326a15 100644 --- a/docs/narr/urldispatch.rst +++ b/docs/narr/urldispatch.rst @@ -52,21 +52,21 @@ allows you to inject ``route`` ZCML directives into your application's When any ``route`` ZCML directive is present in an application's ``configure.zcml``, "under the hood" :mod:`repoze.bfg` wraps the "root -factory" (aka ``get_root``) in a special ``RoutesRootFactory`` -instance. This instance then acts as the root factory. When it acts -as a root factory, it is willing to check the requested URL against a -*routes map* to find the :term:`context` and the :term:`view name` -before traversal has a chance to find it first. If it finds a context -and a view name via a route, :mod:`repoze.bfg` will attempt to look up -and call a :mod:`repoze.bfg` :term:`view` that matches the context and -the view name. If no route matches, :mod:`repoze.bfg` will fail over -to calling the ``get_root`` callable passed to the application in it's +factory" in a special ``RoutesRootFactory`` instance. The wrapper +instance then acts as the root factory. When it acts as a root +factory, it is willing to check the requested URL against a *routes +map* to find the :term:`context` and the :term:`view name` before +traversal has a chance to find it first. If it finds a context and a +view name via a route, :mod:`repoze.bfg` will attempt to look up and +call a :mod:`repoze.bfg` :term:`view` that matches the context and the +view name. If no route matches, :mod:`repoze.bfg` will fail over to +calling the root factory callable passed to the application in it's ``make_app`` function (usually a traversal function). By configuring your ZCML ``route`` statements appropriately, you can mix and match URL dispatch and traversal in this way. .. note:: See :ref:`modelspy_project_section` for an example of a - simple ``get_root`` callable that will use traversal. + simple root factory callable that will use traversal. The ``route`` ZCML Directive ---------------------------- |
