summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorChris McDonough <chrism@agendaless.com>2009-01-17 21:19:52 +0000
committerChris McDonough <chrism@agendaless.com>2009-01-17 21:19:52 +0000
commit6d4b3dd6916ed01e3167d2f0dc0e656b53fb21e9 (patch)
treea782a86a15e5e0d2572a55b4a53bf8c5e1af44e4 /docs
parentcfb57584a19b7b1fa8b916bfb703da17f5b917ad (diff)
downloadpyramid-6d4b3dd6916ed01e3167d2f0dc0e656b53fb21e9.tar.gz
pyramid-6d4b3dd6916ed01e3167d2f0dc0e656b53fb21e9.tar.bz2
pyramid-6d4b3dd6916ed01e3167d2f0dc0e656b53fb21e9.zip
Fix.
Diffstat (limited to 'docs')
-rw-r--r--docs/narr/urldispatch.rst9
1 files changed, 6 insertions, 3 deletions
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)