diff options
| author | Chris McDonough <chrism@agendaless.com> | 2009-05-16 21:22:53 +0000 |
|---|---|---|
| committer | Chris McDonough <chrism@agendaless.com> | 2009-05-16 21:22:53 +0000 |
| commit | 8e2f6eaae104df8bf13678a67f4690294f982e2d (patch) | |
| tree | c6f401b90478c1c33c033a40a1a24db5b380fd36 | |
| parent | 32b12d02df0c70fa7563ec51c79ab4340c95075e (diff) | |
| download | pyramid-8e2f6eaae104df8bf13678a67f4690294f982e2d.tar.gz pyramid-8e2f6eaae104df8bf13678a67f4690294f982e2d.tar.bz2 pyramid-8e2f6eaae104df8bf13678a67f4690294f982e2d.zip | |
``get_options`` no longer exists.
| -rw-r--r-- | docs/narr/startup.rst | 23 |
1 files changed, 7 insertions, 16 deletions
diff --git a/docs/narr/startup.rst b/docs/narr/startup.rst index 000f4d612..58476da79 100644 --- a/docs/narr/startup.rst +++ b/docs/narr/startup.rst @@ -102,22 +102,13 @@ press ``return`` after running ``paster serve MyProject.ini``. Note that the app function imports the ``get_root`` root factory function from the ``myproject.models`` Python module. It then also imports the "bare" ``myproject`` package, and passes ``get_root``, - ``myproject``, and the result of ``get_options(kw)`` as the - ``options`` keyword to the ``make_app`` function of the - ``repoze.bfg.router`` module. - - ``get_options`` is a function imported from a :mod:`repoze.bfg` - package which allows the user to pass framework-related (as opposed - to application-related) options to an application constructor. It - picks off framework-related options from the ``**kw`` dictionary - passed in to the constructor. For example, we actually use a - framework option named ``reload_templates`` in our configuration. - Note that we make no use of this option in our application, but the - fact that we use ``get_options`` to parse the ``*kw`` dict, and - subsequently pass along the result as the ``options`` argument to - ``make_app``. ``reload_templates`` has special meaning to the - framework: if it's ``true``, we will cause templates to be - automatically reloaded by the application when they are changed. + ``myproject``, and the ``options`` keyword as the ``app`` + function's extra keyword args to the ``make_app`` function of the + ``repoze.bfg.router`` module. ``**kw`` here contains all the + options in the ``[app:main]`` section of our .ini file except the + "use" option (which is internal to paste). In this case, ``**kw`` + will be something like ``{'reload_templates':'true', + 'debug_authorization':'false', 'debug_notfound':'false'}``. ``get_root`` is the first argument to ``make_app``, and it is a root factory callable that is invoked on every request to retrieve |
