summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorChris McDonough <chrism@agendaless.com>2009-01-11 02:37:42 +0000
committerChris McDonough <chrism@agendaless.com>2009-01-11 02:37:42 +0000
commit6e18779652d2d02370c94bed040d55f2808e37f4 (patch)
treedb70263c29dc31f90f112cb62bb09d122bdbce4f /docs
parent71ad3c1d7640135236cb3788e67e7be90189202f (diff)
downloadpyramid-6e18779652d2d02370c94bed040d55f2808e37f4.tar.gz
pyramid-6e18779652d2d02370c94bed040d55f2808e37f4.tar.bz2
pyramid-6e18779652d2d02370c94bed040d55f2808e37f4.zip
Fix docs and templates to account for deprecation of get_options.
Diffstat (limited to 'docs')
-rw-r--r--docs/narr/MyProject/myproject/run.py4
-rw-r--r--docs/narr/project.rst5
2 files changed, 4 insertions, 5 deletions
diff --git a/docs/narr/MyProject/myproject/run.py b/docs/narr/MyProject/myproject/run.py
index 33d534f2d..cb9296e1f 100644
--- a/docs/narr/MyProject/myproject/run.py
+++ b/docs/narr/MyProject/myproject/run.py
@@ -1,5 +1,4 @@
from repoze.bfg.router import make_app
-from repoze.bfg.registry import get_options
def app(global_config, **kw):
""" This function returns a repoze.bfg.router.Router object. It
@@ -7,5 +6,4 @@ def app(global_config, **kw):
serve``"""
from myproject.models import get_root
import myproject
- options = get_options(kw)
- return make_app(get_root, myproject, options=options)
+ return make_app(get_root, myproject, options=kw)
diff --git a/docs/narr/project.rst b/docs/narr/project.rst
index 799958f7c..89e4e1d9e 100644
--- a/docs/narr/project.rst
+++ b/docs/narr/project.rst
@@ -582,9 +582,10 @@ without the PasteDeploy configuration file:
.. literalinclude:: MyProject/myproject/run.py
:linenos:
-#. Lines 1 - 2 import functions from :mod:`repoze.bfg` that we use later.
+#. Line 1 imports the ``make_app`` functions from
+ :mod:`repoze.bfg.router` that we use later.
-#. Lines 4-12 define a function that returns a :mod:`repoze.bfg` Router
+#. Lines 3-9 define a function that returns a :mod:`repoze.bfg` Router
application from :ref:`router_module` . This is meant to be called
by the :term:`PasteDeploy` framework as a result of running
``paster serve``.