From c5f24b2957a2a7569d70930ac5bc630cc5aaac55 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Mon, 18 Jan 2010 18:07:12 +0000 Subject: Prep for b1 Merge a bunch of paper-based docs fixes Configure logging during bfgshell. --- repoze/bfg/authorization.py | 2 +- repoze/bfg/paster.py | 1 + repoze/bfg/traversal.py | 6 +++--- repoze/bfg/url.py | 4 ++-- repoze/bfg/view.py | 8 ++++---- 5 files changed, 11 insertions(+), 10 deletions(-) (limited to 'repoze') diff --git a/repoze/bfg/authorization.py b/repoze/bfg/authorization.py index 9ba9eae40..8c46b4a33 100644 --- a/repoze/bfg/authorization.py +++ b/repoze/bfg/authorization.py @@ -12,7 +12,7 @@ from repoze.bfg.security import Everyone class ACLAuthorizationPolicy(object): """ An :term:`authorization policy` which consults an :term:`ACL` object attached to a :term:`context` to determine authorization - information about a a :term:`principal` or multiple principals. + information about a :term:`principal` or multiple principals. If the context is part of a :term:`lineage`, the context's parents are consulted for ACL information too. The following is true about this security policy. diff --git a/repoze/bfg/paster.py b/repoze/bfg/paster.py index 452c13fc5..da1be9692 100644 --- a/repoze/bfg/paster.py +++ b/repoze/bfg/paster.py @@ -92,6 +92,7 @@ class BFGShellCommand(Command): 'root object.') banner = "Python %s on %s\n%s" % (sys.version, sys.platform, cprt) config_file, section_name = self.args + self.logging_file_config(config_file) app = get_app(config_file, section_name, loadapp=self.loadapp[0]) root, closer = get_root(app) if self.IPShell is not None and not self.options.disable_ipython: diff --git a/repoze/bfg/traversal.py b/repoze/bfg/traversal.py index ab6eea038..496b874a2 100644 --- a/repoze/bfg/traversal.py +++ b/repoze/bfg/traversal.py @@ -131,7 +131,7 @@ def model_path(model, *elements): attempt to append it to a string and it will cause a :exc:`TypeError`. - .. note:: The the :term:`root` model *must* have a ``__name__`` + .. note:: 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 @@ -288,7 +288,7 @@ def model_path_tuple(model, *elements): ``model`` object based on its position in an object graph, e.g ``('', 'foo', 'bar')``. Any positional arguments passed in as ``elements`` will be appended as elements in the tuple - representing the the model path. For instance, if the model's + representing the model path. For instance, if the model's path is ``('', 'foo', 'bar')`` and elements equals ``('a', 'b')``, the returned tuple will be ``('', 'foo', 'bar', 'a', b')``. The first element of this tuple will always be the empty string (a @@ -312,7 +312,7 @@ 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__`` + .. note:: 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, diff --git a/repoze/bfg/url.py b/repoze/bfg/url.py index 1d4760842..b8340be6f 100644 --- a/repoze/bfg/url.py +++ b/repoze/bfg/url.py @@ -58,7 +58,7 @@ def route_url(route_name, request, *elements, **kw): structure will be turned into a query string per the documentation of :func:`repoze.bfg.encode.urlencode` function. After the query data is turned into a query string, a leading ``?`` is prepended, - and the the resulting string is appended to the generated URL. + and the resulting string is appended to the generated URL. .. note:: Python data structures that are passed as ``_query`` which are sequences or dictionaries are turned into a @@ -162,7 +162,7 @@ def model_url(model, request, *elements, **kw): structure will be turned into a query string per the documentation of ``repoze.url.urlencode`` function. After the query data is turned into a query string, a leading ``?`` is prepended, and the - the resulting string is appended to the generated URL. + resulting string is appended to the generated URL. .. note:: Python data structures that are passed as ``query`` which are sequences or dictionaries are turned into a diff --git a/repoze/bfg/view.py b/repoze/bfg/view.py index af3acb8b6..bb8972329 100644 --- a/repoze/bfg/view.py +++ b/repoze/bfg/view.py @@ -51,7 +51,7 @@ _marker = object() def render_view_to_response(context, request, name='', secure=True): """ Call the :term:`view callable` configured with a :term:`view - configuration` that matches the the :term:`view name` ``name`` + configuration` that matches the :term:`view name` ``name`` registered against the specified ``context`` and ``request`` and return a :term:`response` object. This function will return ``None`` if a corresponding :term:`view callable` cannot be found @@ -88,7 +88,7 @@ def render_view_to_response(context, request, name='', secure=True): def render_view_to_iterable(context, request, name='', secure=True): """ Call the :term:`view callable` configured with a :term:`view - configuration` that matches the the :term:`view name` ``name`` + configuration` that matches the :term:`view name` ``name`` registered against the specified ``context`` and ``request`` and return an iterable object which represents the body of a response. This function will return ``None`` if a corresponding :term:`view @@ -119,9 +119,9 @@ def render_view_to_iterable(context, request, name='', secure=True): def render_view(context, request, name='', secure=True): """ Call the :term:`view callable` configured with a :term:`view - configuration` that matches the the :term:`view name` ``name`` + configuration` that matches the :term:`view name` ``name`` registered against the specified ``context`` and ``request`` and - and unwind the the view response's ``app_iter`` (see + and unwind the view response's ``app_iter`` (see :ref:`the_response`) into a single string. This function will return ``None`` if a corresponding :term:`view callable` cannot be found (when no :term:`view configuration` matches the combination -- cgit v1.2.3