Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 35 lines (23 sloc) 0.693 kb
5046ea46 »
2011-01-16 first cut (one test still fails)
1 .. _scan_directive:
2
3 ``scan``
4 --------
5
6 To make use of :term:`configuration decoration` decorators, you must
7 perform a :term:`scan`. A scan finds these decorators in code. The
8 ``scan`` ZCML directive tells Pyramid to begin such a scan.
9
10 Attributes
11 ~~~~~~~~~~
12
13 ``package``
14 The package to scan or the single dot (``.``), meaning the
15 "current" package (the package in which the ZCML file lives).
16
17 Example
18 ~~~~~~~
19
20 .. code-block:: xml
21 :linenos:
22
23 <scan package="."/>
24
25 Alternatives
26 ~~~~~~~~~~~~
27
28 The :meth:`pyramid.config.Configurator.scan` method performs
29 the same job as the ``scan`` ZCML directive.
30
31 See Also
32 ~~~~~~~~
33
34 See also :ref:`mapping_views_using_a_decorator_section`.
Something went wrong with that request. Please try again.