summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris McDonough <chrism@agendaless.com>2010-01-03 09:17:24 +0000
committerChris McDonough <chrism@agendaless.com>2010-01-03 09:17:24 +0000
commitb65c43c593cf777ba3f7af3d15b9eec5a76b7586 (patch)
treef92f32a69103ab2e62c43a52fc32dc950d8c657a
parent9eccbed5db9c29326f21639cb22177f598c99155 (diff)
downloadpyramid-b65c43c593cf777ba3f7af3d15b9eec5a76b7586.tar.gz
pyramid-b65c43c593cf777ba3f7af3d15b9eec5a76b7586.tar.bz2
pyramid-b65c43c593cf777ba3f7af3d15b9eec5a76b7586.zip
Renderings.
-rw-r--r--CHANGES.txt4
-rw-r--r--docs/copyright.rst4
-rw-r--r--docs/glossary.rst3
-rw-r--r--docs/tutorials/catalog/index.rst40
4 files changed, 28 insertions, 23 deletions
diff --git a/CHANGES.txt b/CHANGES.txt
index c77b75fa9..ac57c57d9 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -30,10 +30,10 @@ Documentation and Paster Templates
- LaTeX rendering tweaks.
- All uses of the ``Configurator.add_view`` method that used its
- ``for_`` argument now use the ``context``argument instead.
+ ``for_`` argument now use the ``context`` argument instead.
- All uses of the ``Configurator.add_route`` method that used its
- ``view_for`` argument now use the ``view_context``argument instead.
+ ``view_for`` argument now use the ``view_context`` argument instead.
- All uses of the ``view`` ZCML directive that used its ``for``
attribute now use the ``context`` attribute instead.
diff --git a/docs/copyright.rst b/docs/copyright.rst
index 234674428..a99382c8f 100644
--- a/docs/copyright.rst
+++ b/docs/copyright.rst
@@ -5,7 +5,9 @@ Copyright and Trademarks
by Chris McDonough
-Copyright © 2008-2010, Agendaless Consulting.
+.. |copy| unicode:: U+000A9 .. COPYRIGHT SIGN
+
+Copyright |copy| 2008-2010, Agendaless Consulting.
ISBN-13: 978-0-615-34537-6
diff --git a/docs/glossary.rst b/docs/glossary.rst
index c8c07ebb4..1e462db8e 100644
--- a/docs/glossary.rst
+++ b/docs/glossary.rst
@@ -450,7 +450,8 @@ Glossary
An indexing and search facility (fielded and full-text) based on
`zope.index <http://pypi.python.org/pypi/zope.index>`_. See `the
documentation <http://docs.repoze.org/catalog>`_ for more
- information.
+ information. A tutorial for its usage in :mod:`repoze.bfg`
+ exists in :ref:`catalog_tutorial`.
repoze.who
`Authentication middleware <http://docs.repoze.org/who>`_ for
diff --git a/docs/tutorials/catalog/index.rst b/docs/tutorials/catalog/index.rst
index af31ef6b0..5e6b00e69 100644
--- a/docs/tutorials/catalog/index.rst
+++ b/docs/tutorials/catalog/index.rst
@@ -14,20 +14,21 @@ it assumes you want to use a persistent ZODB object as your
be an attribute of this root object. It is further assumed that you
want the application to be based on :term:`traversal`.
-#. Follow the :ref:`zodb_with_zeo` tutorial to get a system set up with
- ZODB and ZEO. When you are finished, come back here.
+#. Follow the :ref:`zodb_with_zeo` tutorial to get a system set up
+ with ZODB and ZEO. When you are finished, come back here.
#. Install the :mod:`repoze.catalog` software within your application's
environment:
.. code-block:: text
- $ easy_install repoze.catalog
+ $ easy_install repoze.catalog
#. Change your ZODB application's ``models.py`` file to look like the
below:
.. code-block:: python
+ :linenos:
from repoze.folder import Folder
from repoze.catalog.catalog import Catalog
@@ -74,6 +75,7 @@ want the application to be based on :term:`traversal`.
something like the below:
.. code-block:: python
+ :linenos:
from myapp.models import Site
@@ -88,7 +90,6 @@ want the application to be based on :term:`traversal`.
command in a terminal window:
.. code-block:: text
- :linenos:
[chrism@snowpro sess]$ ../bin/paster --plugin=repoze.bfg bfgshell \
myapp.ini myapp
@@ -106,28 +107,29 @@ want the application to be based on :term:`traversal`.
>>> root.catalog.search(title='title')
(1, IFSet([-787959756]))
-#. Add other indexes required by your application to the catalog
- within the ``update_indexes`` method of the ``Site`` object.
- Whenever an index is added or removed, invoke the
- ``update_indexes`` method of the site (the root object) from a
- script or from within a ``bfgshell`` session to update the set of
- indexes used by your application.
+As you need them, add other indexes required by your application to
+the catalog by modifying the ``update_indexes`` method of the ``Site``
+object. Whenever an index is added or removed, invoke the
+``update_indexes`` method of the site (the root object) from a script
+or from within a ``bfgshell`` session to update the set of indexes
+used by your application.
+
+In :term:`view` code, you should be able to get a hold of the root
+object via the :func:`repoze.bfg.traversal.find_root` API. The
+``catalog`` attribute of that root object will represent the catalog
+previously added.
Read the :mod:`repoze.catalog` `documentation
<http://docs.repoze.org/catalog>`_ for further information about other
types of indexes to add, using the document map, and how to issue
queries using the catalog query API.
-Note that in :term:`view` code, you should be able to get a hold of
-the root object via the :func:`repoze.bfg.traversal.find_root` API.
-The ``catalog`` attribute of that root object will represent the
-catalog previously added.
-
.. note::
The :mod:`repoze.folder` implementation sends events that can be
- intercepted with a :term:`subscriber` when documents are added and
+ intercepted by a :term:`subscriber` when objects are added and
removed from a folder. It is often useful to hook these events for
- the purpose of mutating the catalog when a new document is added or
- removed. See the `repoze.folder documentation
- <http://docs.repoze.org/folder>`_ for more information.
+ the purpose of mutating the catalog when a new documentlike object
+ is added or removed. See the `repoze.folder documentation
+ <http://docs.repoze.org/folder>`_ for more information about the
+ events it sends.