summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorTres Seaver <tseaver@palladion.com>2013-02-06 13:55:39 -0800
committerTres Seaver <tseaver@palladion.com>2013-02-06 13:55:39 -0800
commit917bdd97ed10dded8328cc5281f1c70906c4d0d5 (patch)
treea9c93af82914c5eb126d2c18b68aa801238025ac /docs
parentf015cb77c51f1638ea62580a4bf00cb1050e6da1 (diff)
parent6a4c6cb1c6ebe148e948726ddf668a3c2aa6c86c (diff)
downloadpyramid-917bdd97ed10dded8328cc5281f1c70906c4d0d5.tar.gz
pyramid-917bdd97ed10dded8328cc5281f1c70906c4d0d5.tar.bz2
pyramid-917bdd97ed10dded8328cc5281f1c70906c4d0d5.zip
Merge pull request #849 from tshepang/patch-3
no need for a 'topic' directive
Diffstat (limited to 'docs')
-rw-r--r--docs/narr/configuration.rst44
1 files changed, 21 insertions, 23 deletions
diff --git a/docs/narr/configuration.rst b/docs/narr/configuration.rst
index 820dda269..cc26c55d9 100644
--- a/docs/narr/configuration.rst
+++ b/docs/narr/configuration.rst
@@ -99,29 +99,27 @@ available for a :term:`scan` to find it later.
A :term:`scan` of a :term:`module` or a :term:`package` and its subpackages
for decorations happens when the :meth:`pyramid.config.Configurator.scan`
method is invoked: scanning implies searching for configuration declarations
-in a package and its subpackages. For example:
-
-.. topic:: Starting A Scan
-
- .. code-block:: python
- :linenos:
-
- from wsgiref.simple_server import make_server
- from pyramid.config import Configurator
- from pyramid.response import Response
- from pyramid.view import view_config
-
- @view_config()
- def hello(request):
- return Response('Hello')
-
- if __name__ == '__main__':
- from pyramid.config import Configurator
- config = Configurator()
- config.scan()
- app = config.make_wsgi_app()
- server = make_server('0.0.0.0', 8080, app)
- server.serve_forever()
+in a package and its subpackages. For example::
+
+.. code-block:: python
+ :linenos:
+
+ from wsgiref.simple_server import make_server
+ from pyramid.config import Configurator
+ from pyramid.response import Response
+ from pyramid.view import view_config
+
+ @view_config()
+ def hello(request):
+ return Response('Hello')
+
+ if __name__ == '__main__':
+ from pyramid.config import Configurator
+ config = Configurator()
+ config.scan()
+ app = config.make_wsgi_app()
+ server = make_server('0.0.0.0', 8080, app)
+ server.serve_forever()
The scanning machinery imports each module and subpackage in a package or
module recursively, looking for special attributes attached to objects