From 6d4b3dd6916ed01e3167d2f0dc0e656b53fb21e9 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Sat, 17 Jan 2009 21:19:52 +0000 Subject: Fix. --- docs/narr/urldispatch.rst | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'docs') diff --git a/docs/narr/urldispatch.rst b/docs/narr/urldispatch.rst index dadc3d9df..ad0c313fa 100644 --- a/docs/narr/urldispatch.rst +++ b/docs/narr/urldispatch.rst @@ -198,9 +198,9 @@ declarative security purposes. A Routes 'trick' can allow for this. Routes makes it possible to pass a ``conditions`` argument to the ``connect`` method of a mapper. The value of ``conditions`` is a dictionary. If you pass a ``conditions`` dictionary to this -``connect`` method with a `function`` key that has a value which is a -function, this function can be used to update the ``__acl__`` of the -model object. +``connect`` method with a ``function`` key that has a value which is a +Python function, this function can be used to update the ``__acl__`` +of the model object. When Routes tries to resolve a particular route via a match, the route object itself will pass the environment and the "match_dict" to the @@ -228,6 +228,9 @@ Here's an example: from repoze.bfg.security import Allow from repoze.bfg.urldispatch import RoutesMapper + def fallback_get_root(environ): + return {} # the graph traversal root is empty in this example + class Article(object): def __init__(self, **kw): self.__dict__.update(kw) -- cgit v1.2.3