diff options
| author | Chris McDonough <chrism@plope.com> | 2012-02-19 11:05:33 -0500 |
|---|---|---|
| committer | Chris McDonough <chrism@plope.com> | 2012-02-19 11:05:33 -0500 |
| commit | d21ba4b61e901b27ceae36f29dac23387a8129d5 (patch) | |
| tree | 48159d69072d9c3f3e9b54ecc1f666c09debe056 /docs/narr | |
| parent | 7f89e2d6c727d3022b38f09d72921afd9302a39c (diff) | |
| download | pyramid-d21ba4b61e901b27ceae36f29dac23387a8129d5.tar.gz pyramid-d21ba4b61e901b27ceae36f29dac23387a8129d5.tar.bz2 pyramid-d21ba4b61e901b27ceae36f29dac23387a8129d5.zip | |
- Put ``pyramid.includes`` targets within ini files in scaffolds on separate
lines in order to be able to tell people to comment out only the
``pyramid_debugtoolbar`` line when they want to disable the toolbar.
Diffstat (limited to 'docs/narr')
| -rw-r--r-- | docs/narr/MyProject/development.ini | 3 | ||||
| -rw-r--r-- | docs/narr/project.rst | 31 |
2 files changed, 28 insertions, 6 deletions
diff --git a/docs/narr/MyProject/development.ini b/docs/narr/MyProject/development.ini index 2ccedb27b..3c38e3805 100644 --- a/docs/narr/MyProject/development.ini +++ b/docs/narr/MyProject/development.ini @@ -7,7 +7,8 @@ pyramid.debug_notfound = false pyramid.debug_routematch = false pyramid.debug_templates = true pyramid.default_locale_name = en -pyramid.includes = pyramid_debugtoolbar +pyramid.includes = + pyramid_debugtoolbar [server:main] use = egg:waitress#main diff --git a/docs/narr/project.rst b/docs/narr/project.rst index 4566a4fb8..5a519ca30 100644 --- a/docs/narr/project.rst +++ b/docs/narr/project.rst @@ -348,27 +348,48 @@ when you use the ``production.ini`` file instead of the ``development.ini`` ini file to run the application. You can also turn the debug toolbar off by editing ``development.ini`` and -commenting out the line ``pyramid.includes = pyramid_debugtoolbar``. For -example, instead of: +commenting out a line. For example, instead of: .. code-block:: ini :linenos: [app:main] ... - pyramid.includes = pyramid_debugtoolbar + pyramid.includes = + pyramid_debugtoolbar -Put a hash mark in front of the ``pyramid.includes`` line: +Put a hash mark at the beginning of the ``pyramid_debugtoolbar`` line: .. code-block:: ini :linenos: [app:main] ... - #pyramid.includes = pyramid_debugtoolbar + pyramid.includes = + # pyramid_debugtoolbar Then restart the application to see that the toolbar has been turned off. +Note that if you comment out the ``pryamid_debugtoolbar`` line, the ``#`` +*must* be in the first column. If you put the hash mark anywhere except the +first column instead, for example like this: + +.. code-block:: ini + :linenos: + + [app:main] + ... + pyramid.includes = + #pyramid_debugtoolbar + +When you attempt to restart the application with a section like the abvoe +you'll receive an error that ends something like this, and the application +will not start: + +.. code-block:: text + + ImportError: No module named #pyramid_debugtoolbar + .. index:: single: project structure |
