diff options
Diffstat (limited to 'docs/narr')
| -rw-r--r-- | docs/narr/MyProject/myproject/run.py | 4 | ||||
| -rw-r--r-- | docs/narr/project.rst | 5 |
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``. |
