Skip to content

Commit

Permalink
- Document deferred.
Browse files Browse the repository at this point in the history
  • Loading branch information
mcdonc committed Sep 8, 2010
1 parent 514b06a commit 02160a7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docs/api.rst
Expand Up @@ -118,6 +118,8 @@ Schema-Related

.. autoclass:: SequenceSchema

.. autoclass:: deferred

.. attribute:: null

Represents a null value in colander-related operations.
Expand Down
6 changes: 6 additions & 0 deletions docs/binding.rst
Expand Up @@ -154,6 +154,12 @@ Let's take a look at an example:
default_date = datetime.date.today(),
categories = [('one', 'One'), ('two', 'Two')]
)
We use ``colander.deferred`` in its preferred manner here: as a
decorator to a function that takes two arguments. For a schema node
value to be considered deferred, it must be an instance of
``colander.deferred`` and using that class as a decorator is the
easiest way to ensure that this happens.

To perform binding, the ``bind`` method of a schema node must be
called. ``bind`` returns a *clone* of the schema node (and its
Expand Down

0 comments on commit 02160a7

Please sign in to comment.