diff options
| author | Michael Merickel <michael@merickel.org> | 2015-02-17 21:08:58 -0600 |
|---|---|---|
| committer | Michael Merickel <michael@merickel.org> | 2015-02-17 21:09:20 -0600 |
| commit | 3c163b212a6848c1d45916073d6a60a9020ea5c1 (patch) | |
| tree | 68382893a334bbfb38aaccb65c9b8ab97cf73080 /docs | |
| parent | fb36f7f359fa677735ea8707b03d7ae5c3dbbb32 (diff) | |
| download | pyramid-3c163b212a6848c1d45916073d6a60a9020ea5c1.tar.gz pyramid-3c163b212a6848c1d45916073d6a60a9020ea5c1.tar.bz2 pyramid-3c163b212a6848c1d45916073d6a60a9020ea5c1.zip | |
reword a small part to clarify what's happening with view_config
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/narr/urldispatch.rst | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/docs/narr/urldispatch.rst b/docs/narr/urldispatch.rst index 2fd971917..ca6a55164 100644 --- a/docs/narr/urldispatch.rst +++ b/docs/narr/urldispatch.rst @@ -502,9 +502,10 @@ and an incoming request matches the *pattern* of the route configuration, the :term:`view callable` named as the ``view`` attribute of the route configuration will be invoked. -Recall that ``config.scan`` is equivalent to calling ``config.add_view``, -because the ``@view_config`` decorator in ``mypackage.views``, shown below, -maps the route name to the matching view callable. In the case of the above +Recall that the ``@view_config`` is equivalent to calling ``config.add_view``, +because the ``config.scan()`` call will import ``mypackage.views``, shown +below, and execute ``config.add_view`` under the hood. Each view then maps the +route name to the matching view callable. In the case of the above example, when the URL of a request matches ``/site/{id}``, the view callable at the Python dotted path name ``mypackage.views.site_view`` will be called with the request. In other words, we've associated a view callable directly with a |
