summaryrefslogtreecommitdiff
path: root/docs/narr/zca.rst
diff options
context:
space:
mode:
Diffstat (limited to 'docs/narr/zca.rst')
-rw-r--r--docs/narr/zca.rst12
1 files changed, 4 insertions, 8 deletions
diff --git a/docs/narr/zca.rst b/docs/narr/zca.rst
index f7707ea29..b0e9b1709 100644
--- a/docs/narr/zca.rst
+++ b/docs/narr/zca.rst
@@ -21,7 +21,6 @@ application can be opaque. For example, here is a typical "unnamed
utility" lookup using the :func:`zope.component.getUtility` global API
as it might appear in a traditional Zope application:
-.. ignore-next-block
.. code-block:: python
:linenos:
@@ -45,7 +44,7 @@ framework implementation detail.
However, developers who are already used to writing :term:`Zope`
applications often still wish to use the ZCA while building a
-:app:`Pyramid` application; :mod:`pyramid` makes this possible.
+:app:`Pyramid` application; :app:`Pyramid` makes this possible.
.. index::
single: get_current_registry
@@ -84,7 +83,7 @@ While this services a reasonable goal, it causes some issues when
trying to use patterns which you might use to build a typical
:term:`Zope` application to build a :app:`Pyramid` application.
Without special help, ZCA "global" APIs such as
-``zope.component.getUtility`` and ``zope.component.getSiteManager``
+:func:`zope.component.getUtility` and :func:`zope.component.getSiteManager`
will use the ZCA "global" registry. Therefore, these APIs
will appear to fail when used in a :app:`Pyramid` application,
because they'll be consulting the ZCA global registry rather than the
@@ -105,8 +104,8 @@ Disusing the Global ZCA API
+++++++++++++++++++++++++++
ZCA "global" API functions such as ``zope.component.getSiteManager``,
-``zope.component.getUtility``, ``zope.component.getAdapter``, and
-``zope.component.getMultiAdapter`` aren't strictly necessary. Every
+``zope.component.getUtility``, :func:`zope.component.getAdapter`, and
+:func:`zope.component.getMultiAdapter` aren't strictly necessary. Every
component registry has a method API that offers the same
functionality; it can be used instead. For example, presuming the
``registry`` value below is a Zope Component Architecture component
@@ -114,7 +113,6 @@ registry, the following bit of code is equivalent to
``zope.component.getUtility(IFoo)``:
.. code-block:: python
- :linenos:
registry.getUtility(IFoo)
@@ -152,7 +150,6 @@ Consider the following bit of idiomatic :app:`Pyramid` startup code:
.. code-block:: python
:linenos:
- from zope.component import getGlobalSiteManager
from pyramid.config import Configurator
def app(global_settings, **settings):
@@ -189,7 +186,6 @@ For example:
.. code-block:: python
:linenos:
- from zope.component import getGlobalSiteManager
from pyramid.config import Configurator
def app(global_settings, **settings):