From bd73fc6cc17544d14b029c528cd70da73dd0a364 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Sun, 17 Jan 2010 17:55:39 +0000 Subject: Using a single chapter for the API docs and a single chapter for the ZCML directives made it hard to read. --- docs/zcml/scan.rst | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 docs/zcml/scan.rst (limited to 'docs/zcml/scan.rst') diff --git a/docs/zcml/scan.rst b/docs/zcml/scan.rst new file mode 100644 index 000000000..d48cf66b4 --- /dev/null +++ b/docs/zcml/scan.rst @@ -0,0 +1,35 @@ +.. _scan_directive: + +``scan`` +-------- + +To make use of :term:`configuration decoration` decorators, you must +perform a :term:`scan`. A scan finds these decorators in code. The +``scan`` ZCML directive tells :mod:`repoze.bfg` to begin such a scan. + +Attributes +~~~~~~~~~~ + +``package`` + + The package to scan or the single dot (``.``), meaning the + "current" package (the package in which the ZCML file lives). + +Example +~~~~~~~ + +.. code-block:: xml + :linenos: + + + +Alternatives +~~~~~~~~~~~~ + +The :meth:`repoze.bfg.configuration.Configurator.scan` method performs +the same job as the ``scan`` ZCML directive. + +See Also +~~~~~~~~ + +See also :ref:`mapping_views_using_a_decorator_section`. -- cgit v1.2.3