From dfad1fbd9fa46c67aee8de3c3d3b36c0af1ec7bf Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Thu, 14 May 2009 05:59:12 +0000 Subject: Docs rendering tweaks. --- repoze/bfg/push.py | 7 ++++--- repoze/bfg/traversal.py | 24 ++++++++++++------------ 2 files changed, 16 insertions(+), 15 deletions(-) diff --git a/repoze/bfg/push.py b/repoze/bfg/push.py index c6f9e25cb..cefa19efc 100644 --- a/repoze/bfg/push.py +++ b/repoze/bfg/push.py @@ -9,9 +9,10 @@ except ImportError: #pragma NO COVERAGE from repoze.bfg.functional import wraps #pragma NO COVERAGE class pushpage(object): - """ Decorator for a function which returns a response object after - running the namespace the wrapped function returns through a - Chameleon ZPT template. + """ + Decorator for a function which returns a response object after + running the namespace the wrapped function returns through a + Chameleon ZPT template. E.g.:: diff --git a/repoze/bfg/traversal.py b/repoze/bfg/traversal.py index 572c31e74..49017a93b 100644 --- a/repoze/bfg/traversal.py +++ b/repoze/bfg/traversal.py @@ -152,12 +152,12 @@ def model_path(model, *elements): ``model_path`` function will attempt to append it to a string and it will cause a TypeError. - .. note:: The the :term:`root` model *must* have a ``__name__`` - attribute with a value of either ``None`` or the empty - string for paths to be generated properly. If the root - model has a non-null ``__name__`` attribute, its name - will be prepended to the generated path rather than a - single leading '/' character. + .. note:: The the :term:`root` model *must* have a ``__name__`` + attribute with a value of either ``None`` or the empty + string for paths to be generated properly. If the root + model has a non-null ``__name__`` attribute, its name + will be prepended to the generated path rather than a + single leading '/' character. """ path = _model_path_list(model, *elements) return path and '/'.join([quote_path_segment(x) for x in path]) or '/' @@ -192,12 +192,12 @@ def model_path_tuple(model, *elements): dictionary will be placed in the path tuple; no warning or error will be given. - .. note:: The the :term:`root` model *must* have a ``__name__`` - attribute with a value of either ``None`` or the empty - string for path tuples to be generated properly. If - the root model has a non-null ``__name__`` attribute, - its name will be the first element in the generated - path tuple rather than the empty string. + .. note:: The the :term:`root` model *must* have a ``__name__`` + attribute with a value of either ``None`` or the empty + string for path tuples to be generated properly. If + the root model has a non-null ``__name__`` attribute, + its name will be the first element in the generated + path tuple rather than the empty string. """ return tuple(_model_path_list(model, *elements)) -- cgit v1.2.3