From d21ba4b61e901b27ceae36f29dac23387a8129d5 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Sun, 19 Feb 2012 11:05:33 -0500 Subject: - 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. --- docs/narr/MyProject/development.ini | 3 ++- docs/narr/project.rst | 31 ++++++++++++++++++---- .../wiki/src/authorization/development.ini | 8 +++--- .../wiki/src/authorization/production.ini | 6 +++-- .../tutorials/wiki/src/basiclayout/development.ini | 8 +++--- docs/tutorials/wiki/src/basiclayout/production.ini | 6 +++-- docs/tutorials/wiki/src/models/development.ini | 8 +++--- docs/tutorials/wiki/src/models/production.ini | 6 +++-- docs/tutorials/wiki/src/tests/development.ini | 8 +++--- docs/tutorials/wiki/src/tests/production.ini | 6 +++-- docs/tutorials/wiki/src/views/development.ini | 8 +++--- docs/tutorials/wiki/src/views/production.ini | 6 +++-- .../wiki2/src/authorization/development.ini | 5 ++-- .../wiki2/src/authorization/production.ini | 3 ++- .../wiki2/src/basiclayout/development.ini | 5 ++-- .../tutorials/wiki2/src/basiclayout/production.ini | 3 ++- docs/tutorials/wiki2/src/models/development.ini | 5 ++-- docs/tutorials/wiki2/src/models/production.ini | 3 ++- docs/tutorials/wiki2/src/tests/development.ini | 5 ++-- docs/tutorials/wiki2/src/tests/production.ini | 3 ++- docs/tutorials/wiki2/src/views/development.ini | 5 ++-- docs/tutorials/wiki2/src/views/production.ini | 3 ++- 22 files changed, 98 insertions(+), 46 deletions(-) (limited to 'docs') 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 diff --git a/docs/tutorials/wiki/src/authorization/development.ini b/docs/tutorials/wiki/src/authorization/development.ini index 47566515c..74781caed 100644 --- a/docs/tutorials/wiki/src/authorization/development.ini +++ b/docs/tutorials/wiki/src/authorization/development.ini @@ -6,9 +6,11 @@ pyramid.debug_notfound = false pyramid.debug_routematch = false pyramid.debug_templates = true pyramid.default_locale_name = en -pyramid.includes = pyramid_debugtoolbar - pyramid_zodbconn - pyramid_tm +pyramid.includes = + pyramid_debugtoolbar + pyramid_zodbconn + pyramid_tm + tm.attempts = 3 zodbconn.uri = file://%(here)s/Data.fs?connection_cache_size=20000 diff --git a/docs/tutorials/wiki/src/authorization/production.ini b/docs/tutorials/wiki/src/authorization/production.ini index 919efce1e..2da493def 100644 --- a/docs/tutorials/wiki/src/authorization/production.ini +++ b/docs/tutorials/wiki/src/authorization/production.ini @@ -6,8 +6,10 @@ pyramid.debug_notfound = false pyramid.debug_routematch = false pyramid.debug_templates = false pyramid.default_locale_name = en -pyramid.includes = pyramid_tm - pyramid_zodbconn +pyramid.includes = + pyramid_tm + pyramid_zodbconn + tm.attempts = 3 zodbconn.uri = file://%(here)s/Data.fs?connection_cache_size=20000 diff --git a/docs/tutorials/wiki/src/basiclayout/development.ini b/docs/tutorials/wiki/src/basiclayout/development.ini index 3acff7f6d..5a3dba52a 100644 --- a/docs/tutorials/wiki/src/basiclayout/development.ini +++ b/docs/tutorials/wiki/src/basiclayout/development.ini @@ -6,9 +6,11 @@ pyramid.debug_notfound = false pyramid.debug_routematch = false pyramid.debug_templates = true pyramid.default_locale_name = en -pyramid.includes = pyramid_debugtoolbar - pyramid_zodbconn - pyramid_tm +pyramid.includes = + pyramid_debugtoolbar + pyramid_zodbconn + pyramid_tm + tm.attempts = 3 zodbconn.uri = file://%(here)s/Data.fs?connection_cache_size=20000 diff --git a/docs/tutorials/wiki/src/basiclayout/production.ini b/docs/tutorials/wiki/src/basiclayout/production.ini index 919efce1e..2da493def 100644 --- a/docs/tutorials/wiki/src/basiclayout/production.ini +++ b/docs/tutorials/wiki/src/basiclayout/production.ini @@ -6,8 +6,10 @@ pyramid.debug_notfound = false pyramid.debug_routematch = false pyramid.debug_templates = false pyramid.default_locale_name = en -pyramid.includes = pyramid_tm - pyramid_zodbconn +pyramid.includes = + pyramid_tm + pyramid_zodbconn + tm.attempts = 3 zodbconn.uri = file://%(here)s/Data.fs?connection_cache_size=20000 diff --git a/docs/tutorials/wiki/src/models/development.ini b/docs/tutorials/wiki/src/models/development.ini index 47566515c..74781caed 100644 --- a/docs/tutorials/wiki/src/models/development.ini +++ b/docs/tutorials/wiki/src/models/development.ini @@ -6,9 +6,11 @@ pyramid.debug_notfound = false pyramid.debug_routematch = false pyramid.debug_templates = true pyramid.default_locale_name = en -pyramid.includes = pyramid_debugtoolbar - pyramid_zodbconn - pyramid_tm +pyramid.includes = + pyramid_debugtoolbar + pyramid_zodbconn + pyramid_tm + tm.attempts = 3 zodbconn.uri = file://%(here)s/Data.fs?connection_cache_size=20000 diff --git a/docs/tutorials/wiki/src/models/production.ini b/docs/tutorials/wiki/src/models/production.ini index 919efce1e..2da493def 100644 --- a/docs/tutorials/wiki/src/models/production.ini +++ b/docs/tutorials/wiki/src/models/production.ini @@ -6,8 +6,10 @@ pyramid.debug_notfound = false pyramid.debug_routematch = false pyramid.debug_templates = false pyramid.default_locale_name = en -pyramid.includes = pyramid_tm - pyramid_zodbconn +pyramid.includes = + pyramid_tm + pyramid_zodbconn + tm.attempts = 3 zodbconn.uri = file://%(here)s/Data.fs?connection_cache_size=20000 diff --git a/docs/tutorials/wiki/src/tests/development.ini b/docs/tutorials/wiki/src/tests/development.ini index 47566515c..74781caed 100644 --- a/docs/tutorials/wiki/src/tests/development.ini +++ b/docs/tutorials/wiki/src/tests/development.ini @@ -6,9 +6,11 @@ pyramid.debug_notfound = false pyramid.debug_routematch = false pyramid.debug_templates = true pyramid.default_locale_name = en -pyramid.includes = pyramid_debugtoolbar - pyramid_zodbconn - pyramid_tm +pyramid.includes = + pyramid_debugtoolbar + pyramid_zodbconn + pyramid_tm + tm.attempts = 3 zodbconn.uri = file://%(here)s/Data.fs?connection_cache_size=20000 diff --git a/docs/tutorials/wiki/src/tests/production.ini b/docs/tutorials/wiki/src/tests/production.ini index 919efce1e..2da493def 100644 --- a/docs/tutorials/wiki/src/tests/production.ini +++ b/docs/tutorials/wiki/src/tests/production.ini @@ -6,8 +6,10 @@ pyramid.debug_notfound = false pyramid.debug_routematch = false pyramid.debug_templates = false pyramid.default_locale_name = en -pyramid.includes = pyramid_tm - pyramid_zodbconn +pyramid.includes = + pyramid_tm + pyramid_zodbconn + tm.attempts = 3 zodbconn.uri = file://%(here)s/Data.fs?connection_cache_size=20000 diff --git a/docs/tutorials/wiki/src/views/development.ini b/docs/tutorials/wiki/src/views/development.ini index 3acff7f6d..5a3dba52a 100644 --- a/docs/tutorials/wiki/src/views/development.ini +++ b/docs/tutorials/wiki/src/views/development.ini @@ -6,9 +6,11 @@ pyramid.debug_notfound = false pyramid.debug_routematch = false pyramid.debug_templates = true pyramid.default_locale_name = en -pyramid.includes = pyramid_debugtoolbar - pyramid_zodbconn - pyramid_tm +pyramid.includes = + pyramid_debugtoolbar + pyramid_zodbconn + pyramid_tm + tm.attempts = 3 zodbconn.uri = file://%(here)s/Data.fs?connection_cache_size=20000 diff --git a/docs/tutorials/wiki/src/views/production.ini b/docs/tutorials/wiki/src/views/production.ini index 919efce1e..2da493def 100644 --- a/docs/tutorials/wiki/src/views/production.ini +++ b/docs/tutorials/wiki/src/views/production.ini @@ -6,8 +6,10 @@ pyramid.debug_notfound = false pyramid.debug_routematch = false pyramid.debug_templates = false pyramid.default_locale_name = en -pyramid.includes = pyramid_tm - pyramid_zodbconn +pyramid.includes = + pyramid_tm + pyramid_zodbconn + tm.attempts = 3 zodbconn.uri = file://%(here)s/Data.fs?connection_cache_size=20000 diff --git a/docs/tutorials/wiki2/src/authorization/development.ini b/docs/tutorials/wiki2/src/authorization/development.ini index 2bb74454c..06c51fb12 100644 --- a/docs/tutorials/wiki2/src/authorization/development.ini +++ b/docs/tutorials/wiki2/src/authorization/development.ini @@ -7,8 +7,9 @@ pyramid.debug_notfound = false pyramid.debug_routematch = false pyramid.debug_templates = true pyramid.default_locale_name = en -pyramid.includes = pyramid_debugtoolbar - pyramid_tm +pyramid.includes = + pyramid_debugtoolbar + pyramid_tm sqlalchemy.url = sqlite:///%(here)s/tutorial.db diff --git a/docs/tutorials/wiki2/src/authorization/production.ini b/docs/tutorials/wiki2/src/authorization/production.ini index ec6dea135..cefb5c231 100644 --- a/docs/tutorials/wiki2/src/authorization/production.ini +++ b/docs/tutorials/wiki2/src/authorization/production.ini @@ -7,7 +7,8 @@ pyramid.debug_notfound = false pyramid.debug_routematch = false pyramid.debug_templates = false pyramid.default_locale_name = en -pyramid.includes = pyramid_tm +pyramid.includes = + pyramid_tm sqlalchemy.url = sqlite:///%(here)s/tutorial.db diff --git a/docs/tutorials/wiki2/src/basiclayout/development.ini b/docs/tutorials/wiki2/src/basiclayout/development.ini index 2bb74454c..06c51fb12 100644 --- a/docs/tutorials/wiki2/src/basiclayout/development.ini +++ b/docs/tutorials/wiki2/src/basiclayout/development.ini @@ -7,8 +7,9 @@ pyramid.debug_notfound = false pyramid.debug_routematch = false pyramid.debug_templates = true pyramid.default_locale_name = en -pyramid.includes = pyramid_debugtoolbar - pyramid_tm +pyramid.includes = + pyramid_debugtoolbar + pyramid_tm sqlalchemy.url = sqlite:///%(here)s/tutorial.db diff --git a/docs/tutorials/wiki2/src/basiclayout/production.ini b/docs/tutorials/wiki2/src/basiclayout/production.ini index ec6dea135..cefb5c231 100644 --- a/docs/tutorials/wiki2/src/basiclayout/production.ini +++ b/docs/tutorials/wiki2/src/basiclayout/production.ini @@ -7,7 +7,8 @@ pyramid.debug_notfound = false pyramid.debug_routematch = false pyramid.debug_templates = false pyramid.default_locale_name = en -pyramid.includes = pyramid_tm +pyramid.includes = + pyramid_tm sqlalchemy.url = sqlite:///%(here)s/tutorial.db diff --git a/docs/tutorials/wiki2/src/models/development.ini b/docs/tutorials/wiki2/src/models/development.ini index 2bb74454c..06c51fb12 100644 --- a/docs/tutorials/wiki2/src/models/development.ini +++ b/docs/tutorials/wiki2/src/models/development.ini @@ -7,8 +7,9 @@ pyramid.debug_notfound = false pyramid.debug_routematch = false pyramid.debug_templates = true pyramid.default_locale_name = en -pyramid.includes = pyramid_debugtoolbar - pyramid_tm +pyramid.includes = + pyramid_debugtoolbar + pyramid_tm sqlalchemy.url = sqlite:///%(here)s/tutorial.db diff --git a/docs/tutorials/wiki2/src/models/production.ini b/docs/tutorials/wiki2/src/models/production.ini index ec6dea135..cefb5c231 100644 --- a/docs/tutorials/wiki2/src/models/production.ini +++ b/docs/tutorials/wiki2/src/models/production.ini @@ -7,7 +7,8 @@ pyramid.debug_notfound = false pyramid.debug_routematch = false pyramid.debug_templates = false pyramid.default_locale_name = en -pyramid.includes = pyramid_tm +pyramid.includes = + pyramid_tm sqlalchemy.url = sqlite:///%(here)s/tutorial.db diff --git a/docs/tutorials/wiki2/src/tests/development.ini b/docs/tutorials/wiki2/src/tests/development.ini index 2bb74454c..06c51fb12 100644 --- a/docs/tutorials/wiki2/src/tests/development.ini +++ b/docs/tutorials/wiki2/src/tests/development.ini @@ -7,8 +7,9 @@ pyramid.debug_notfound = false pyramid.debug_routematch = false pyramid.debug_templates = true pyramid.default_locale_name = en -pyramid.includes = pyramid_debugtoolbar - pyramid_tm +pyramid.includes = + pyramid_debugtoolbar + pyramid_tm sqlalchemy.url = sqlite:///%(here)s/tutorial.db diff --git a/docs/tutorials/wiki2/src/tests/production.ini b/docs/tutorials/wiki2/src/tests/production.ini index ec6dea135..cefb5c231 100644 --- a/docs/tutorials/wiki2/src/tests/production.ini +++ b/docs/tutorials/wiki2/src/tests/production.ini @@ -7,7 +7,8 @@ pyramid.debug_notfound = false pyramid.debug_routematch = false pyramid.debug_templates = false pyramid.default_locale_name = en -pyramid.includes = pyramid_tm +pyramid.includes = + pyramid_tm sqlalchemy.url = sqlite:///%(here)s/tutorial.db diff --git a/docs/tutorials/wiki2/src/views/development.ini b/docs/tutorials/wiki2/src/views/development.ini index 2bb74454c..06c51fb12 100644 --- a/docs/tutorials/wiki2/src/views/development.ini +++ b/docs/tutorials/wiki2/src/views/development.ini @@ -7,8 +7,9 @@ pyramid.debug_notfound = false pyramid.debug_routematch = false pyramid.debug_templates = true pyramid.default_locale_name = en -pyramid.includes = pyramid_debugtoolbar - pyramid_tm +pyramid.includes = + pyramid_debugtoolbar + pyramid_tm sqlalchemy.url = sqlite:///%(here)s/tutorial.db diff --git a/docs/tutorials/wiki2/src/views/production.ini b/docs/tutorials/wiki2/src/views/production.ini index ec6dea135..cefb5c231 100644 --- a/docs/tutorials/wiki2/src/views/production.ini +++ b/docs/tutorials/wiki2/src/views/production.ini @@ -7,7 +7,8 @@ pyramid.debug_notfound = false pyramid.debug_routematch = false pyramid.debug_templates = false pyramid.default_locale_name = en -pyramid.includes = pyramid_tm +pyramid.includes = + pyramid_tm sqlalchemy.url = sqlite:///%(here)s/tutorial.db -- cgit v1.2.3