From c18b16d293ee60117747f0de042e2d75361d1fd8 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Tue, 7 Dec 2010 12:43:47 -0500 Subject: remove misleading section from resources docs --- docs/narr/resources.rst | 34 ---------------------------------- 1 file changed, 34 deletions(-) (limited to 'docs/narr/resources.rst') diff --git a/docs/narr/resources.rst b/docs/narr/resources.rst index 3ff8af90b..d9edd954e 100644 --- a/docs/narr/resources.rst +++ b/docs/narr/resources.rst @@ -114,40 +114,6 @@ following kinds of resources defined in any Python package: - Any other resource (or set of resources) addressed by code that uses the setuptools :term:`pkg_resources` API. -Usually, overriding a resource in an existing application means -performing the following steps: - -- Create a new Python package. The easiest way to do this is to - create a new :app:`Pyramid` application using the "paster" - template mechanism. See :ref:`creating_a_project` for more - information. - -- Install the new package into the same Python environment as the - original application (e.g. ``python setup.py develop`` or ``python - setup.py install``). - -- Change the ``configure.zcml`` in the new package to include one or - more ``resource`` ZCML directives (see :ref:`resource_directive` - below). The new package's ``configure.zcml`` should then include - the original :app:`Pyramid` application's ``configure.zcml`` via - an include statement, e.g. ````. - -- Add override resources to the package as necessary. - -- Change the Paste ``.ini`` file that starts up the original - application. Add a ``configure_zcml`` statement within the - application's section in the file which points at your *new* - package's ``configure.zcml`` file. See :ref:`environment_chapter` - for more information about this setting. - -Note that overriding resources is not the only way to extend or modify -the behavior of an existing :app:`Pyramid` application. A "heavier -hammer" way to do the same thing is explained in -:ref:`extending_chapter`. The heavier hammer way allows you to -replace a :term:`view` wholesale rather than resources that might be -used by a view. - .. index:: single: override_resource -- cgit v1.2.3 From d7f2590a4c2c2164bdb01ba977119ccbb6b2b09c Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Thu, 9 Dec 2010 02:30:23 -0500 Subject: fix docs: pyramid.configuration -> pyramid.config --- docs/narr/resources.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'docs/narr/resources.rst') diff --git a/docs/narr/resources.rst b/docs/narr/resources.rst index 3ff8af90b..575afd1fe 100644 --- a/docs/narr/resources.rst +++ b/docs/narr/resources.rst @@ -157,7 +157,7 @@ The ``override_resource`` API ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ An individual call to -:meth:`pyramid.configuration.Configurator.override_resource` can +:meth:`pyramid.config.Configurator.override_resource` can override a single resource. For example: .. ignore-next-block @@ -213,7 +213,7 @@ will need to register two overrides. The package name in a specification may start with a dot, meaning that the package is relative to the package in which the configuration construction file resides (or the ``package`` argument to the -:class:`pyramid.configuration.Configurator` class construction). +:class:`pyramid.config.Configurator` class construction). For example: .. ignore-next-block @@ -245,7 +245,7 @@ The ``resource`` ZCML Directive ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Instead of using -:meth:`pyramid.configuration.Configurator.override_resource` during +:meth:`pyramid.config.Configurator.override_resource` during :term:`imperative configuration`, an equivalent can be used to perform all the tasks described above within :term:`ZCML`. The ZCML ``resource`` tag is a frontend to using ``override_resource``. -- cgit v1.2.3