summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Merickel <michael@merickel.org>2011-07-14 18:59:20 -0500
committerMichael Merickel <michael@merickel.org>2011-07-14 19:56:44 -0500
commit71696bd1a38466033370c3de56c55ebcd64163f2 (patch)
tree448a477268c798c1bb5c731d597fa3bb26c64554
parent6fa3ad096942a171765ffca94d648eed911feefe (diff)
downloadpyramid-71696bd1a38466033370c3de56c55ebcd64163f2.tar.gz
pyramid-71696bd1a38466033370c3de56c55ebcd64163f2.tar.bz2
pyramid-71696bd1a38466033370c3de56c55ebcd64163f2.zip
Modified bootstrap to return a dict.
-rw-r--r--pyramid/paster.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/pyramid/paster.py b/pyramid/paster.py
index 9ebeacab9..578b854a5 100644
--- a/pyramid/paster.py
+++ b/pyramid/paster.py
@@ -38,7 +38,9 @@ def get_app(config_uri, name=None, loadapp=loadapp):
def bootstrap(config_uri, request=None):
""" Load a WSGI application from the PasteDeploy config file specified
- by ``config_uri``.
+ by ``config_uri``. The environment will be configured as if it is
+ currently serving ``request``, leaving a natural environment in place
+ to write scripts that can generate URLs and utilize renderers.
.. note:: Most operations within :app:`Pyramid` expect to be invoked
within the context of a WSGI request, thus it's important when
@@ -65,7 +67,11 @@ def bootstrap(config_uri, request=None):
"""
app = get_app(config_uri)
root, closer = get_root2(request)
- return (app, root, closer)
+ return {
+ 'app': app,
+ 'root': root,
+ 'closer': closer,
+ }
_marker = object()