summaryrefslogtreecommitdiff
path: root/docs/narr
diff options
context:
space:
mode:
authorChris McDonough <chrism@agendaless.com>2009-12-29 05:09:56 +0000
committerChris McDonough <chrism@agendaless.com>2009-12-29 05:09:56 +0000
commit27477816ba22b1f1edead0c4ec6efe5459b33e94 (patch)
treec7429964ae08090b0e93a6ac5e32de596e1e3e59 /docs/narr
parente6f681fdca19490f9f7bb6274a38d0784ce3daac (diff)
downloadpyramid-27477816ba22b1f1edead0c4ec6efe5459b33e94.tar.gz
pyramid-27477816ba22b1f1edead0c4ec6efe5459b33e94.tar.bz2
pyramid-27477816ba22b1f1edead0c4ec6efe5459b33e94.zip
Overlong lines.
Fix table.
Diffstat (limited to 'docs/narr')
-rw-r--r--docs/narr/MyProject/myproject/templates/mytemplate.pt12
-rw-r--r--docs/narr/environment.rst146
-rw-r--r--docs/narr/install.rst3
-rw-r--r--docs/narr/unittesting.rst3
4 files changed, 104 insertions, 60 deletions
diff --git a/docs/narr/MyProject/myproject/templates/mytemplate.pt b/docs/narr/MyProject/myproject/templates/mytemplate.pt
index e50d7cff2..3a9decb46 100644
--- a/docs/narr/MyProject/myproject/templates/mytemplate.pt
+++ b/docs/narr/MyProject/myproject/templates/mytemplate.pt
@@ -50,8 +50,8 @@
<h2><code>repoze.bfg</code> links</h2>
<ul>
<li><a
- href="http://static.repoze.org/bfgdocs/#narrative-documentation">Narrative
- Documentation</a>
+ href="http://static.repoze.org/bfgdocs/#narrative-documentation"
+ >Narrative Documentation</a>
</li>
<li>
<a
@@ -69,13 +69,13 @@
</li>
<li>
<a
- href="http://static.repoze.org/bfgdocs/#sample-applications">Sample
- Applications</a>
+ href="http://static.repoze.org/bfgdocs/#sample-applications"
+ >Sample Applications</a>
</li>
<li>
<a
- href="http://static.repoze.org/bfgdocs/#support-and-development">Support
- and Development</a>
+ href="http://static.repoze.org/bfgdocs/#support-and-development"
+ >Support and Development</a>
</li>
<li>
<a
diff --git a/docs/narr/environment.rst b/docs/narr/environment.rst
index e56c2602f..b43aefc2f 100644
--- a/docs/narr/environment.rst
+++ b/docs/narr/environment.rst
@@ -2,8 +2,6 @@
single: environment variables
single: settings
single: reload
- single: configure.zcml
- single: configure_zcml
single: debug_authorization
single: reload_resources
single: debug_notfound
@@ -36,53 +34,92 @@ setting names documented in this chapter are reserved for
:mod:`repoze.bfg` use. You should not use them to indicate
application-specific configuration settings.
-+---------------------------------+-----------------------------+----------------------------------------+
-| Environment Variable Name | Config File Setting Name | Further Information |
-+=================================+=============================+========================================+
-| ``BFG_RELOAD_TEMPLATES`` | ``reload_templates`` | Reload templates without restart |
-| | | when true |
-| | | See also: |
-| | | :ref:`reload_templates_section` |
-+---------------------------------+-----------------------------+----------------------------------------+
-| ``BFG_RELOAD_RESOURCES`` | ``reload_resources`` | Don't cache any resource file data |
-| | | when true |
-| | | See also: |
-| | | :ref:`overriding_resources_section` |
-+---------------------------------+-----------------------------+----------------------------------------+
-| ``BFG_DEBUG_AUTHORIZATION`` | ``debug_authorization`` | Print view authorization failure & |
-| | | success info to stderr when true |
-| | | See also: |
-| | | :ref:`debug_authorization_section` |
-+---------------------------------+-----------------------------+----------------------------------------+
-| ``BFG_DEBUG_NOTFOUND`` | ``debug_notfound`` | Print view-related NotFound debug |
-| | | messages to stderr when true |
-| | | See also: |
-| | | :ref:`debug_notfound_section` |
-+---------------------------------+-----------------------------+----------------------------------------+
-| ``BFG_DEBUG_ALL`` | ``debug_all`` | Turns all debug_* settings on. |
-+---------------------------------+-----------------------------+----------------------------------------+
-| ``BFG_RELOAD_ALL`` | ``reload_all`` | Turns all reload_* settings on. |
-+---------------------------------+-----------------------------+----------------------------------------+
-| ``BFG_CONFIGURE_ZCML`` | ``configure_zcml`` | Use the specified filename to load |
-| | | the default app :term:`ZCML` file |
-| | | instead of the filename implied by |
-| | | ``filename`` value passed to |
-| | | ``repoze.bfg.router.make_app``. If |
-| | | this is a relative filename, it will |
-| | | be considered relative to the |
-| | | ``package`` passed to ``make_app`` |
-| | | by the application. It may also |
-| | | take the form of a :term:`resource |
-| | | specification` which names both the |
-| | | package name and a package-relative |
-| | | filename, e.g. |
-| | | ``dotted.package.name:path/to.zcml``. |
-| | | If it is a resource specification, |
-| | | both the *package* and the |
-| | | *filename* passed to ``make_app`` |
-| | | are overridden with the implied |
-| | | values. |
-+---------------------------------+-----------------------------+----------------------------------------+
+Reloading Templates
+~~~~~~~~~~~~~~~~~~~
+
+When this value is true, reload templates without a restart.
+
++---------------------------------+-----------------------------+
+| Environment Variable Name | Config File Setting Name |
++=================================+=============================+
+| ``BFG_RELOAD_TEMPLATES`` | ``reload_templates`` |
+| | |
+| | |
+| | |
++---------------------------------+-----------------------------+
+
+Reloading Resources
+~~~~~~~~~~~~~~~~~~~
+
+Don't cache any resource file data when this value is true. See
+also :ref:`overriding_resources_section`.
+
++---------------------------------+-----------------------------+
+| Environment Variable Name | Config File Setting Name |
++=================================+=============================+
+| ``BFG_RELOAD_RESOURCES`` | ``reload_resources`` |
+| | |
+| | |
+| | |
++---------------------------------+-----------------------------+
+
+Debugging Authorization
+~~~~~~~~~~~~~~~~~~~~~~~
+
+Print view authorization failure and success information to stderr
+when this value is true. See also :ref:`debug_authorization_section`.
+
++---------------------------------+-----------------------------+
+| Environment Variable Name | Config File Setting Name |
++=================================+=============================+
+| ``BFG_DEBUG_AUTHORIZATION`` | ``debug_authorization`` |
+| | |
+| | |
+| | |
++---------------------------------+-----------------------------+
+
+Debugging Not Found Errors
+~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Print view-related ``NotFound`` debug messages to stderr
+when this value is true. See also :ref:`debug_notfound_section`.
+
++---------------------------------+-----------------------------+
+| Environment Variable Name | Config File Setting Name |
++=================================+=============================+
+| ``BFG_DEBUG_NOTFOUND`` | ``debug_notfound`` |
+| | |
+| | |
+| | |
++---------------------------------+-----------------------------+
+
+Debugging All
+~~~~~~~~~~~~~
+
+Turns on all ``debug*`` settings.
+
++---------------------------------+-----------------------------+
+| Environment Variable Name | Config File Setting Name |
++=================================+=============================+
+| ``BFG_DEBUG_ALL`` | ``debug_all`` |
+| | |
+| | |
+| | |
++---------------------------------+-----------------------------+
+
+Reload All
+~~~~~~~~~~
+
+Turns on all ``reload*`` settings.
+
++---------------------------------+-----------------------------+
+| Environment Variable Name | Config File Setting Name |
++=================================+=============================+
+| ``BFG_RELOAD_ALL`` | ``reload_all`` |
+| | |
+| | |
+| | |
++---------------------------------+-----------------------------+
Examples
--------
@@ -92,7 +129,9 @@ there is a section representing your application named ``[app:main]``
within the file that represents your :mod:`repoze.bfg` application.
The configuration file settings documented in the above "Config File
Setting Name" column would go in the ``[app:main]`` section. Here's
-an example of such a section::
+an example of such a section:
+
+.. code-block:: ini
[app:main]
use = egg:MyProject#app
@@ -101,9 +140,12 @@ an example of such a section::
You can also use environment variables to accomplish the same purpose
for settings documented as such. For example, you might start your
-:mod:`repoze.bfg` application using the following command line::
+:mod:`repoze.bfg` application using the following command line:
+
+.. code-block:: python
- BFG_DEBUG_AUTHORIZATION=1 BFG_RELOAD_TEMPLATES=1 bin/paster serve MyProject.ini
+ $ BFG_DEBUG_AUTHORIZATION=1 BFG_RELOAD_TEMPLATES=1 bin/paster serve \
+ MyProject.ini
If you started your application this way, your :mod:`repoze.bfg`
application would behave in the same manner as if you had placed the
diff --git a/docs/narr/install.rst b/docs/narr/install.rst
index 8f09ff13f..d0bb7ae92 100644
--- a/docs/narr/install.rst
+++ b/docs/narr/install.rst
@@ -93,7 +93,8 @@ the following commands:
[chrism@vitaminf ~]$ mkdir opt
[chrism@vitaminf ~]$ cd tmp
[chrism@vitaminf tmp]$ cd tmp
- [chrism@vitaminf tmp]$ wget http://python.org/ftp/python/2.5.4/Python-2.5.4.tgz
+ [chrism@vitaminf tmp]$ wget \
+ http://python.org/ftp/python/2.5.4/Python-2.5.4.tgz
[chrism@vitaminf tmp]$ tar xvzf Python-2.5.4.tgz
[chrism@vitaminf tmp]$ cd Python-2.5.4
[chrism@vitaminf Python-2.5.4]$ ./configure --prefix=$HOME/opt/Python-2.5.4
diff --git a/docs/narr/unittesting.rst b/docs/narr/unittesting.rst
index d032e3a36..112536100 100644
--- a/docs/narr/unittesting.rst
+++ b/docs/narr/unittesting.rst
@@ -231,7 +231,8 @@ used the testing API.
def test_view_fn_submitted(self):
from my.package import view_fn
- renderer = self.config.testing_add_template('templates/submitted.pt')
+ renderer = self.config.testing_add_template(
+ 'templates/submitted.pt')
request = testing.DummyRequest()
request.params['say'] = 'Yo'
response = view_fn(request)