Skip to content

Commit

Permalink
- Put pyramid.includes targets within ini files in scaffolds on s…
Browse files Browse the repository at this point in the history
…eparate

  lines in order to be able to tell people to comment out only the
  ``pyramid_debugtoolbar`` line when they want to disable the toolbar.
  • Loading branch information
mcdonc committed Feb 19, 2012
1 parent 7f89e2d commit d21ba4b
Show file tree
Hide file tree
Showing 29 changed files with 121 additions and 59 deletions.
7 changes: 7 additions & 0 deletions CHANGES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,13 @@ Documentation
- Don't create a ``session`` instance in SQLA Wiki tutorial, use raw
``DBSession`` instead (this is more common in real SQLA apps).

Scaffolding
-----------

- 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.

Dependencies
------------

Expand Down
4 changes: 0 additions & 4 deletions TODO.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,6 @@ Nice-to-Have
- Fix renderers chapter to better document system values passed to template
renderers.

- Put includes in development.ini within scaffolding and tutorials on
separate lines and fix project.rst to tell people to comment out only the
debugtoolbar include when they want to disable.

- Modify view mapper narrative docs to not use pyramid_handlers.

- Modify the urldispatch chapter examples to assume a scan rather than
Expand Down
3 changes: 2 additions & 1 deletion docs/narr/MyProject/development.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
31 changes: 26 additions & 5 deletions docs/narr/project.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
8 changes: 5 additions & 3 deletions docs/tutorials/wiki/src/authorization/development.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
6 changes: 4 additions & 2 deletions docs/tutorials/wiki/src/authorization/production.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
8 changes: 5 additions & 3 deletions docs/tutorials/wiki/src/basiclayout/development.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
6 changes: 4 additions & 2 deletions docs/tutorials/wiki/src/basiclayout/production.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
8 changes: 5 additions & 3 deletions docs/tutorials/wiki/src/models/development.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
6 changes: 4 additions & 2 deletions docs/tutorials/wiki/src/models/production.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
8 changes: 5 additions & 3 deletions docs/tutorials/wiki/src/tests/development.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
6 changes: 4 additions & 2 deletions docs/tutorials/wiki/src/tests/production.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
8 changes: 5 additions & 3 deletions docs/tutorials/wiki/src/views/development.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
6 changes: 4 additions & 2 deletions docs/tutorials/wiki/src/views/production.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
5 changes: 3 additions & 2 deletions docs/tutorials/wiki2/src/authorization/development.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
3 changes: 2 additions & 1 deletion docs/tutorials/wiki2/src/authorization/production.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
5 changes: 3 additions & 2 deletions docs/tutorials/wiki2/src/basiclayout/development.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
3 changes: 2 additions & 1 deletion docs/tutorials/wiki2/src/basiclayout/production.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
5 changes: 3 additions & 2 deletions docs/tutorials/wiki2/src/models/development.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
3 changes: 2 additions & 1 deletion docs/tutorials/wiki2/src/models/production.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
5 changes: 3 additions & 2 deletions docs/tutorials/wiki2/src/tests/development.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
3 changes: 2 additions & 1 deletion docs/tutorials/wiki2/src/tests/production.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
5 changes: 3 additions & 2 deletions docs/tutorials/wiki2/src/views/development.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
3 changes: 2 additions & 1 deletion docs/tutorials/wiki2/src/views/production.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
5 changes: 3 additions & 2 deletions pyramid/scaffolds/alchemy/development.ini_tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -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/{{project}}.db

Expand Down
3 changes: 2 additions & 1 deletion pyramid/scaffolds/alchemy/production.ini_tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -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/{{project}}.db

Expand Down
3 changes: 2 additions & 1 deletion pyramid/scaffolds/starter/development.ini_tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 5 additions & 3 deletions pyramid/scaffolds/zodb/development.ini_tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,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

Expand Down
6 changes: 4 additions & 2 deletions pyramid/scaffolds/zodb/production.ini_tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,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

Expand Down

0 comments on commit d21ba4b

Please sign in to comment.