summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris McDonough <chrism@plope.com>2011-08-09 22:35:42 -0400
committerChris McDonough <chrism@plope.com>2011-08-09 22:35:42 -0400
commit4dc4e3f33969773fb31169ba80ab5a297fd9c952 (patch)
treeab4e13040c49c00579a6a0b275b7bed55b4dbce5
parent4dea53b033a2bb25857187bb9006bbd52df739bd (diff)
parentc9c0ccc2179f63fa3c4030e64b6ccbf8c8996e08 (diff)
downloadpyramid-4dc4e3f33969773fb31169ba80ab5a297fd9c952.tar.gz
pyramid-4dc4e3f33969773fb31169ba80ab5a297fd9c952.tar.bz2
pyramid-4dc4e3f33969773fb31169ba80ab5a297fd9c952.zip
Merge branch 'scafftween'
-rw-r--r--docs/narr/MyProject/development.ini3
-rw-r--r--docs/narr/MyProject/production.ini1
-rw-r--r--docs/narr/MyProject/setup.py2
-rw-r--r--docs/narr/project-debug.pngbin0 -> 153807 bytes
-rw-r--r--docs/narr/project.pngbin84679 -> 128727 bytes
-rw-r--r--docs/narr/project.rst73
-rw-r--r--docs/tutorials/wiki/src/authorization/development.ini11
-rw-r--r--docs/tutorials/wiki/src/authorization/production.ini9
-rw-r--r--docs/tutorials/wiki/src/authorization/setup.py4
-rw-r--r--docs/tutorials/wiki/src/basiclayout/development.ini11
-rw-r--r--docs/tutorials/wiki/src/basiclayout/production.ini9
-rw-r--r--docs/tutorials/wiki/src/basiclayout/setup.py4
-rw-r--r--docs/tutorials/wiki/src/models/development.ini11
-rw-r--r--docs/tutorials/wiki/src/models/production.ini9
-rw-r--r--docs/tutorials/wiki/src/models/setup.py4
-rw-r--r--docs/tutorials/wiki/src/tests/development.ini11
-rw-r--r--docs/tutorials/wiki/src/tests/production.ini9
-rw-r--r--docs/tutorials/wiki/src/tests/setup.py4
-rw-r--r--docs/tutorials/wiki/src/views/development.ini11
-rw-r--r--docs/tutorials/wiki/src/views/production.ini9
-rw-r--r--docs/tutorials/wiki/src/views/setup.py4
-rw-r--r--pyramid/scaffolds/alchemy/development.ini_tmpl8
-rw-r--r--pyramid/scaffolds/alchemy/production.ini_tmpl6
-rw-r--r--pyramid/scaffolds/alchemy/setup.py_tmpl3
-rw-r--r--pyramid/scaffolds/routesalchemy/development.ini_tmpl8
-rw-r--r--pyramid/scaffolds/routesalchemy/production.ini_tmpl6
-rw-r--r--pyramid/scaffolds/routesalchemy/setup.py_tmpl3
-rw-r--r--pyramid/scaffolds/starter/development.ini_tmpl2
-rw-r--r--pyramid/scaffolds/starter/setup.py_tmpl2
-rw-r--r--pyramid/scaffolds/tests.py43
-rw-r--r--pyramid/scaffolds/zodb/development.ini_tmpl10
-rw-r--r--pyramid/scaffolds/zodb/production.ini_tmpl8
-rw-r--r--pyramid/scaffolds/zodb/setup.py_tmpl4
33 files changed, 153 insertions, 149 deletions
diff --git a/docs/narr/MyProject/development.ini b/docs/narr/MyProject/development.ini
index d0db3047c..1818e387b 100644
--- a/docs/narr/MyProject/development.ini
+++ b/docs/narr/MyProject/development.ini
@@ -1,15 +1,16 @@
[app:MyProject]
use = egg:MyProject
+
pyramid.reload_templates = true
pyramid.debug_authorization = false
pyramid.debug_notfound = false
pyramid.debug_routematch = false
pyramid.debug_templates = true
pyramid.default_locale_name = en
+pyramid.include = pyramid_debugtoolbar
[pipeline:main]
pipeline =
- egg:WebError#evalerror
MyProject
[server:main]
diff --git a/docs/narr/MyProject/production.ini b/docs/narr/MyProject/production.ini
index d0ed9628c..7a5674d23 100644
--- a/docs/narr/MyProject/production.ini
+++ b/docs/narr/MyProject/production.ini
@@ -1,5 +1,6 @@
[app:MyProject]
use = egg:MyProject
+
pyramid.reload_templates = false
pyramid.debug_authorization = false
pyramid.debug_notfound = false
diff --git a/docs/narr/MyProject/setup.py b/docs/narr/MyProject/setup.py
index a64d65ba6..a0b6fab9e 100644
--- a/docs/narr/MyProject/setup.py
+++ b/docs/narr/MyProject/setup.py
@@ -6,7 +6,7 @@ here = os.path.abspath(os.path.dirname(__file__))
README = open(os.path.join(here, 'README.txt')).read()
CHANGES = open(os.path.join(here, 'CHANGES.txt')).read()
-requires = ['pyramid', 'WebError']
+requires = ['pyramid', 'pyramid_debugtoolbar', 'WebError']
setup(name='MyProject',
version='0.0',
diff --git a/docs/narr/project-debug.png b/docs/narr/project-debug.png
new file mode 100644
index 000000000..d13a91736
--- /dev/null
+++ b/docs/narr/project-debug.png
Binary files differ
diff --git a/docs/narr/project.png b/docs/narr/project.png
index da5bc870b..fc00ec086 100644
--- a/docs/narr/project.png
+++ b/docs/narr/project.png
Binary files differ
diff --git a/docs/narr/project.rst b/docs/narr/project.rst
index 3b1b45eda..baf4c86fa 100644
--- a/docs/narr/project.rst
+++ b/docs/narr/project.rst
@@ -99,18 +99,18 @@ We'll choose the ``pyramid_starter`` scaffold for this purpose.
$ bin/paster create -t pyramid_starter
-The above command uses the ``paster create`` command to create a project with the
-``pyramid_starter`` scaffold. To use a different scaffold, such as
+The above command uses the ``paster create`` command to create a project with
+the ``pyramid_starter`` scaffold. To use a different scaffold, such as
``pyramid_routesalchemy``, you'd just change the last argument. For example:
.. code-block:: text
$ bin/paster create -t pyramid_routesalchemy
-``paster create`` will ask you a single question: the *name* of the
-project. You should use a string without spaces and with only letters
-in it. Here's sample output from a run of ``paster create`` for a
-project we name ``MyProject``:
+``paster create`` will ask you a single question: the *name* of the project.
+You should use a string without spaces and with only letters in it. Here's
+sample output from a run of ``paster create`` for a project we name
+``MyProject``:
.. code-block:: text
@@ -309,6 +309,45 @@ browser like what is displayed in the following image:
This is the page shown by default when you visit an unmodified ``paster
create`` -generated ``pyramid_starter`` application in a browser.
+If you click on the image shown at the right hand top of the page ("^DT"),
+you'll be presented with a debug toolbar that provides various niceties while
+you're developing. This image will float above every HTML page served by
+:app:`Pyramid` while you develop an application, and allows you show the
+toolbar as necessary. Click on ``Hide`` to hide the toolbar and show the
+image again.
+
+.. image:: project-debug.png
+
+For more information about what the debug toolbar allows you to do, see `the
+documentation for pyramid_debugtoolbar
+<http://docs.pylonsproject.org/projects/pyramid_debugtoolbar/dev/>`_.
+
+The debug toolbar will not be shown (and all debugging will be turned off)
+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.include = pyramid_debugtoolbar``. For
+example, instead of:
+
+.. code-block:: ini
+ :linenos:
+
+ [app:MyApp]
+ ...
+ pyramid.include = pyramid_debugtoolbar
+
+Put a hash mark in front of the ``pyramid.include`` line:
+
+.. code-block:: ini
+ :linenos:
+
+ [app:MyApp]
+ ...
+ #pyramid.include = pyramid_debugtoolbar
+
+Then restart the application to see that the toolbar has been turned off.
+
.. sidebar:: Using an Alternate WSGI Server
The code generated by a :app:`Pyramid` scaffold assumes that you
@@ -419,8 +458,6 @@ serve``, as well as the deployment settings provided to that application.
The generated ``development.ini`` file looks like so:
-.. latexbroken?
-
.. literalinclude:: MyProject/development.ini
:language: ini
:linenos:
@@ -489,6 +526,14 @@ information.
options should be turned off for production applications, as template
rendering is slowed when either is turned on.
+The ``pyramid.include`` setting in the ``[app:MyProject]`` section tells
+Pyramid to "include" configuration from another package. In this case, the
+line ``pyramid.include = pyramid_debugtoolbar`` tells Pyramid to include
+configuration from the ``pyramid_debugtoolbar`` package. This turns on a
+debugging panel in development mode which will be shown on the right hand
+side of the screen. Including the debug toolbar will also make it possible
+to interactively debug exceptions when an error occurs.
+
Various other settings may exist in this section having to do with debugging
or influencing runtime behavior of a :app:`Pyramid` application. See
:ref:`environment_chapter` for more information about these settings.
@@ -543,11 +588,13 @@ implementations.
The ``production.ini`` file is a :term:`PasteDeploy` configuration file with
a purpose much like that of ``development.ini``. However, it disables the
-WebError interactive debugger, replacing it with a logger which outputs
-exception messages to ``stderr`` by default. It also turns off template
-development options such that templates are not automatically reloaded when
-changed, and turns off all debugging options. You can use this file instead
-of ``development.ini`` when you put your application into production.
+debug toolbar, replacing it with a logger which outputs exception messages to
+``stderr`` by default. It also turns off template development options such
+that templates are not automatically reloaded when changed, and turns off all
+debugging options. It allows you to configure a ``weberror#error_catcher``
+section that will cause exceptions to be sent to an email address when they
+are uncaught. You can use this file instead of ``development.ini`` when you
+put your application into production.
.. index::
single: MANIFEST.in
diff --git a/docs/tutorials/wiki/src/authorization/development.ini b/docs/tutorials/wiki/src/authorization/development.ini
index 07800514e..8c60f4ea9 100644
--- a/docs/tutorials/wiki/src/authorization/development.ini
+++ b/docs/tutorials/wiki/src/authorization/development.ini
@@ -6,20 +6,17 @@ pyramid.debug_notfound = false
pyramid.debug_routematch = false
pyramid.debug_templates = true
pyramid.default_locale_name = en
+pyramid.include = pyramid_debugtoolbar
+ pyramid_tm
+pyramid_tm.attempts = 3
+
zodb_uri = file://%(here)s/Data.fs?connection_cache_size=20000
[pipeline:main]
pipeline =
- egg:WebError#evalerror
egg:repoze.zodbconn#closer
- egg:repoze.retry#retry
- tm
tutorial
-[filter:tm]
-use = egg:repoze.tm2#tm
-commit_veto = repoze.tm:default_commit_veto
-
[server:main]
use = egg:Paste#http
host = 0.0.0.0
diff --git a/docs/tutorials/wiki/src/authorization/production.ini b/docs/tutorials/wiki/src/authorization/production.ini
index 217bdd260..2cfca5f80 100644
--- a/docs/tutorials/wiki/src/authorization/production.ini
+++ b/docs/tutorials/wiki/src/authorization/production.ini
@@ -6,6 +6,9 @@ pyramid.debug_notfound = false
pyramid.debug_routematch = false
pyramid.debug_templates = false
pyramid.default_locale_name = en
+pyramid.include = pyramid_tm
+pyramid_tm.attempts = 3
+
zodb_uri = file://%(here)s/Data.fs?connection_cache_size=20000
[filter:weberror]
@@ -22,16 +25,10 @@ debug = false
;smtp_use_tls =
;error_message =
-[filter:tm]
-use = egg:repoze.tm2#tm
-commit_veto = repoze.tm:default_commit_veto
-
[pipeline:main]
pipeline =
weberror
egg:repoze.zodbconn#closer
- egg:repoze.retry#retry
- tm
tutorial
[server:main]
diff --git a/docs/tutorials/wiki/src/authorization/setup.py b/docs/tutorials/wiki/src/authorization/setup.py
index adfa70c9f..f3b404516 100644
--- a/docs/tutorials/wiki/src/authorization/setup.py
+++ b/docs/tutorials/wiki/src/authorization/setup.py
@@ -9,8 +9,8 @@ CHANGES = open(os.path.join(here, 'CHANGES.txt')).read()
requires = [
'pyramid',
'repoze.zodbconn',
- 'repoze.tm2>=1.0b1', # default_commit_veto
- 'repoze.retry',
+ 'pyramid_tm',
+ 'pyramid_debugtoolbar',
'ZODB3',
'WebError',
'docutils',
diff --git a/docs/tutorials/wiki/src/basiclayout/development.ini b/docs/tutorials/wiki/src/basiclayout/development.ini
index 04e341f2e..3913f45db 100644
--- a/docs/tutorials/wiki/src/basiclayout/development.ini
+++ b/docs/tutorials/wiki/src/basiclayout/development.ini
@@ -6,20 +6,17 @@ pyramid.debug_notfound = false
pyramid.debug_routematch = false
pyramid.debug_templates = true
pyramid.default_locale_name = en
+pyramid.include = pyramid_debugtoolbar
+ pyramid_tm
+pyramid_tm.attempts = 3
+
zodb_uri = file://%(here)s/Data.fs?connection_cache_size=20000
[pipeline:main]
pipeline =
- egg:WebError#evalerror
egg:repoze.zodbconn#closer
- egg:repoze.retry#retry
- tm
tutorial
-[filter:tm]
-use = egg:repoze.tm2#tm
-commit_veto = repoze.tm:default_commit_veto
-
[server:main]
use = egg:Paste#http
host = 0.0.0.0
diff --git a/docs/tutorials/wiki/src/basiclayout/production.ini b/docs/tutorials/wiki/src/basiclayout/production.ini
index 217bdd260..2cfca5f80 100644
--- a/docs/tutorials/wiki/src/basiclayout/production.ini
+++ b/docs/tutorials/wiki/src/basiclayout/production.ini
@@ -6,6 +6,9 @@ pyramid.debug_notfound = false
pyramid.debug_routematch = false
pyramid.debug_templates = false
pyramid.default_locale_name = en
+pyramid.include = pyramid_tm
+pyramid_tm.attempts = 3
+
zodb_uri = file://%(here)s/Data.fs?connection_cache_size=20000
[filter:weberror]
@@ -22,16 +25,10 @@ debug = false
;smtp_use_tls =
;error_message =
-[filter:tm]
-use = egg:repoze.tm2#tm
-commit_veto = repoze.tm:default_commit_veto
-
[pipeline:main]
pipeline =
weberror
egg:repoze.zodbconn#closer
- egg:repoze.retry#retry
- tm
tutorial
[server:main]
diff --git a/docs/tutorials/wiki/src/basiclayout/setup.py b/docs/tutorials/wiki/src/basiclayout/setup.py
index 2d540d65b..31833dc7f 100644
--- a/docs/tutorials/wiki/src/basiclayout/setup.py
+++ b/docs/tutorials/wiki/src/basiclayout/setup.py
@@ -9,8 +9,8 @@ CHANGES = open(os.path.join(here, 'CHANGES.txt')).read()
requires = [
'pyramid',
'repoze.zodbconn',
- 'repoze.tm2>=1.0b1', # default_commit_veto
- 'repoze.retry',
+ 'pyramid_tm',
+ 'pyramid_debugtoolbar',
'ZODB3',
'WebError',
]
diff --git a/docs/tutorials/wiki/src/models/development.ini b/docs/tutorials/wiki/src/models/development.ini
index 07800514e..8c60f4ea9 100644
--- a/docs/tutorials/wiki/src/models/development.ini
+++ b/docs/tutorials/wiki/src/models/development.ini
@@ -6,20 +6,17 @@ pyramid.debug_notfound = false
pyramid.debug_routematch = false
pyramid.debug_templates = true
pyramid.default_locale_name = en
+pyramid.include = pyramid_debugtoolbar
+ pyramid_tm
+pyramid_tm.attempts = 3
+
zodb_uri = file://%(here)s/Data.fs?connection_cache_size=20000
[pipeline:main]
pipeline =
- egg:WebError#evalerror
egg:repoze.zodbconn#closer
- egg:repoze.retry#retry
- tm
tutorial
-[filter:tm]
-use = egg:repoze.tm2#tm
-commit_veto = repoze.tm:default_commit_veto
-
[server:main]
use = egg:Paste#http
host = 0.0.0.0
diff --git a/docs/tutorials/wiki/src/models/production.ini b/docs/tutorials/wiki/src/models/production.ini
index 217bdd260..2cfca5f80 100644
--- a/docs/tutorials/wiki/src/models/production.ini
+++ b/docs/tutorials/wiki/src/models/production.ini
@@ -6,6 +6,9 @@ pyramid.debug_notfound = false
pyramid.debug_routematch = false
pyramid.debug_templates = false
pyramid.default_locale_name = en
+pyramid.include = pyramid_tm
+pyramid_tm.attempts = 3
+
zodb_uri = file://%(here)s/Data.fs?connection_cache_size=20000
[filter:weberror]
@@ -22,16 +25,10 @@ debug = false
;smtp_use_tls =
;error_message =
-[filter:tm]
-use = egg:repoze.tm2#tm
-commit_veto = repoze.tm:default_commit_veto
-
[pipeline:main]
pipeline =
weberror
egg:repoze.zodbconn#closer
- egg:repoze.retry#retry
- tm
tutorial
[server:main]
diff --git a/docs/tutorials/wiki/src/models/setup.py b/docs/tutorials/wiki/src/models/setup.py
index 2d540d65b..31833dc7f 100644
--- a/docs/tutorials/wiki/src/models/setup.py
+++ b/docs/tutorials/wiki/src/models/setup.py
@@ -9,8 +9,8 @@ CHANGES = open(os.path.join(here, 'CHANGES.txt')).read()
requires = [
'pyramid',
'repoze.zodbconn',
- 'repoze.tm2>=1.0b1', # default_commit_veto
- 'repoze.retry',
+ 'pyramid_tm',
+ 'pyramid_debugtoolbar',
'ZODB3',
'WebError',
]
diff --git a/docs/tutorials/wiki/src/tests/development.ini b/docs/tutorials/wiki/src/tests/development.ini
index 07800514e..8c60f4ea9 100644
--- a/docs/tutorials/wiki/src/tests/development.ini
+++ b/docs/tutorials/wiki/src/tests/development.ini
@@ -6,20 +6,17 @@ pyramid.debug_notfound = false
pyramid.debug_routematch = false
pyramid.debug_templates = true
pyramid.default_locale_name = en
+pyramid.include = pyramid_debugtoolbar
+ pyramid_tm
+pyramid_tm.attempts = 3
+
zodb_uri = file://%(here)s/Data.fs?connection_cache_size=20000
[pipeline:main]
pipeline =
- egg:WebError#evalerror
egg:repoze.zodbconn#closer
- egg:repoze.retry#retry
- tm
tutorial
-[filter:tm]
-use = egg:repoze.tm2#tm
-commit_veto = repoze.tm:default_commit_veto
-
[server:main]
use = egg:Paste#http
host = 0.0.0.0
diff --git a/docs/tutorials/wiki/src/tests/production.ini b/docs/tutorials/wiki/src/tests/production.ini
index 217bdd260..2cfca5f80 100644
--- a/docs/tutorials/wiki/src/tests/production.ini
+++ b/docs/tutorials/wiki/src/tests/production.ini
@@ -6,6 +6,9 @@ pyramid.debug_notfound = false
pyramid.debug_routematch = false
pyramid.debug_templates = false
pyramid.default_locale_name = en
+pyramid.include = pyramid_tm
+pyramid_tm.attempts = 3
+
zodb_uri = file://%(here)s/Data.fs?connection_cache_size=20000
[filter:weberror]
@@ -22,16 +25,10 @@ debug = false
;smtp_use_tls =
;error_message =
-[filter:tm]
-use = egg:repoze.tm2#tm
-commit_veto = repoze.tm:default_commit_veto
-
[pipeline:main]
pipeline =
weberror
egg:repoze.zodbconn#closer
- egg:repoze.retry#retry
- tm
tutorial
[server:main]
diff --git a/docs/tutorials/wiki/src/tests/setup.py b/docs/tutorials/wiki/src/tests/setup.py
index d2c8f5697..603bb6bac 100644
--- a/docs/tutorials/wiki/src/tests/setup.py
+++ b/docs/tutorials/wiki/src/tests/setup.py
@@ -9,8 +9,8 @@ CHANGES = open(os.path.join(here, 'CHANGES.txt')).read()
requires = [
'pyramid',
'repoze.zodbconn',
- 'repoze.tm2>=1.0b1',
- 'repoze.retry',
+ 'pyramid_tm',
+ 'pyramid_debugtoolbar',
'ZODB3',
'WebError',
'docutils',
diff --git a/docs/tutorials/wiki/src/views/development.ini b/docs/tutorials/wiki/src/views/development.ini
index 04e341f2e..3913f45db 100644
--- a/docs/tutorials/wiki/src/views/development.ini
+++ b/docs/tutorials/wiki/src/views/development.ini
@@ -6,20 +6,17 @@ pyramid.debug_notfound = false
pyramid.debug_routematch = false
pyramid.debug_templates = true
pyramid.default_locale_name = en
+pyramid.include = pyramid_debugtoolbar
+ pyramid_tm
+pyramid_tm.attempts = 3
+
zodb_uri = file://%(here)s/Data.fs?connection_cache_size=20000
[pipeline:main]
pipeline =
- egg:WebError#evalerror
egg:repoze.zodbconn#closer
- egg:repoze.retry#retry
- tm
tutorial
-[filter:tm]
-use = egg:repoze.tm2#tm
-commit_veto = repoze.tm:default_commit_veto
-
[server:main]
use = egg:Paste#http
host = 0.0.0.0
diff --git a/docs/tutorials/wiki/src/views/production.ini b/docs/tutorials/wiki/src/views/production.ini
index 217bdd260..2cfca5f80 100644
--- a/docs/tutorials/wiki/src/views/production.ini
+++ b/docs/tutorials/wiki/src/views/production.ini
@@ -6,6 +6,9 @@ pyramid.debug_notfound = false
pyramid.debug_routematch = false
pyramid.debug_templates = false
pyramid.default_locale_name = en
+pyramid.include = pyramid_tm
+pyramid_tm.attempts = 3
+
zodb_uri = file://%(here)s/Data.fs?connection_cache_size=20000
[filter:weberror]
@@ -22,16 +25,10 @@ debug = false
;smtp_use_tls =
;error_message =
-[filter:tm]
-use = egg:repoze.tm2#tm
-commit_veto = repoze.tm:default_commit_veto
-
[pipeline:main]
pipeline =
weberror
egg:repoze.zodbconn#closer
- egg:repoze.retry#retry
- tm
tutorial
[server:main]
diff --git a/docs/tutorials/wiki/src/views/setup.py b/docs/tutorials/wiki/src/views/setup.py
index daa5e5eb1..6acc004c0 100644
--- a/docs/tutorials/wiki/src/views/setup.py
+++ b/docs/tutorials/wiki/src/views/setup.py
@@ -9,8 +9,8 @@ CHANGES = open(os.path.join(here, 'CHANGES.txt')).read()
requires = [
'pyramid',
'repoze.zodbconn',
- 'repoze.tm2>=1.0b1', # default_commit_veto
- 'repoze.retry',
+ 'pyramid_tm',
+ 'pyramid_debugtoolbar',
'ZODB3',
'WebError',
'docutils',
diff --git a/pyramid/scaffolds/alchemy/development.ini_tmpl b/pyramid/scaffolds/alchemy/development.ini_tmpl
index 06c29069d..4dc4c2461 100644
--- a/pyramid/scaffolds/alchemy/development.ini_tmpl
+++ b/pyramid/scaffolds/alchemy/development.ini_tmpl
@@ -7,19 +7,15 @@ pyramid.debug_notfound = false
pyramid.debug_routematch = false
pyramid.debug_templates = true
pyramid.default_locale_name = en
+pyramid.include = pyramid_debugtoolbar
+ pyramid_tm
sqlalchemy.url = sqlite:///%(here)s/{{project}}.db
[pipeline:main]
pipeline =
- egg:WebError#evalerror
- tm
{{project}}
-[filter:tm]
-use = egg:repoze.tm2#tm
-commit_veto = repoze.tm:default_commit_veto
-
[server:main]
use = egg:Paste#http
host = 0.0.0.0
diff --git a/pyramid/scaffolds/alchemy/production.ini_tmpl b/pyramid/scaffolds/alchemy/production.ini_tmpl
index 6025d9a14..dadf6c366 100644
--- a/pyramid/scaffolds/alchemy/production.ini_tmpl
+++ b/pyramid/scaffolds/alchemy/production.ini_tmpl
@@ -7,6 +7,7 @@ pyramid.debug_notfound = false
pyramid.debug_routematch = false
pyramid.debug_templates = false
pyramid.default_locale_name = en
+pyramid.includes = pyramid_tm
sqlalchemy.url = sqlite:///%(here)s/{{project}}.db
@@ -24,14 +25,9 @@ debug = false
;smtp_use_tls =
;error_message =
-[filter:tm]
-use = egg:repoze.tm2#tm
-commit_veto = repoze.tm:default_commit_veto
-
[pipeline:main]
pipeline =
weberror
- tm
{{project}}
[server:main]
diff --git a/pyramid/scaffolds/alchemy/setup.py_tmpl b/pyramid/scaffolds/alchemy/setup.py_tmpl
index 8e9da9755..183d8cc24 100644
--- a/pyramid/scaffolds/alchemy/setup.py_tmpl
+++ b/pyramid/scaffolds/alchemy/setup.py_tmpl
@@ -9,7 +9,8 @@ CHANGES = open(os.path.join(here, 'CHANGES.txt')).read()
requires = [
'pyramid',
- 'repoze.tm2>=1.0b1', # default_commit_veto
+ 'pyramid_tm',
+ 'pyramid_debugtoolbar',
'sqlalchemy',
'zope.sqlalchemy',
'WebError',
diff --git a/pyramid/scaffolds/routesalchemy/development.ini_tmpl b/pyramid/scaffolds/routesalchemy/development.ini_tmpl
index 06c29069d..4dc4c2461 100644
--- a/pyramid/scaffolds/routesalchemy/development.ini_tmpl
+++ b/pyramid/scaffolds/routesalchemy/development.ini_tmpl
@@ -7,19 +7,15 @@ pyramid.debug_notfound = false
pyramid.debug_routematch = false
pyramid.debug_templates = true
pyramid.default_locale_name = en
+pyramid.include = pyramid_debugtoolbar
+ pyramid_tm
sqlalchemy.url = sqlite:///%(here)s/{{project}}.db
[pipeline:main]
pipeline =
- egg:WebError#evalerror
- tm
{{project}}
-[filter:tm]
-use = egg:repoze.tm2#tm
-commit_veto = repoze.tm:default_commit_veto
-
[server:main]
use = egg:Paste#http
host = 0.0.0.0
diff --git a/pyramid/scaffolds/routesalchemy/production.ini_tmpl b/pyramid/scaffolds/routesalchemy/production.ini_tmpl
index 6025d9a14..9fd182ba3 100644
--- a/pyramid/scaffolds/routesalchemy/production.ini_tmpl
+++ b/pyramid/scaffolds/routesalchemy/production.ini_tmpl
@@ -7,6 +7,7 @@ pyramid.debug_notfound = false
pyramid.debug_routematch = false
pyramid.debug_templates = false
pyramid.default_locale_name = en
+pyramid.include = pyramid_tm
sqlalchemy.url = sqlite:///%(here)s/{{project}}.db
@@ -24,14 +25,9 @@ debug = false
;smtp_use_tls =
;error_message =
-[filter:tm]
-use = egg:repoze.tm2#tm
-commit_veto = repoze.tm:default_commit_veto
-
[pipeline:main]
pipeline =
weberror
- tm
{{project}}
[server:main]
diff --git a/pyramid/scaffolds/routesalchemy/setup.py_tmpl b/pyramid/scaffolds/routesalchemy/setup.py_tmpl
index 936a5dde0..cd5eacfb7 100644
--- a/pyramid/scaffolds/routesalchemy/setup.py_tmpl
+++ b/pyramid/scaffolds/routesalchemy/setup.py_tmpl
@@ -11,7 +11,8 @@ requires = [
'pyramid',
'SQLAlchemy',
'transaction',
- 'repoze.tm2>=1.0b1', # default_commit_veto
+ 'pyramid_tm',
+ 'pyramid_debugtoolbar',
'zope.sqlalchemy',
'WebError',
]
diff --git a/pyramid/scaffolds/starter/development.ini_tmpl b/pyramid/scaffolds/starter/development.ini_tmpl
index 1239dca3f..bbb448055 100644
--- a/pyramid/scaffolds/starter/development.ini_tmpl
+++ b/pyramid/scaffolds/starter/development.ini_tmpl
@@ -7,10 +7,10 @@ pyramid.debug_notfound = false
pyramid.debug_routematch = false
pyramid.debug_templates = true
pyramid.default_locale_name = en
+pyramid.include = pyramid_debugtoolbar
[pipeline:main]
pipeline =
- egg:WebError#evalerror
{{project}}
[server:main]
diff --git a/pyramid/scaffolds/starter/setup.py_tmpl b/pyramid/scaffolds/starter/setup.py_tmpl
index bd2642627..84a20bd87 100644
--- a/pyramid/scaffolds/starter/setup.py_tmpl
+++ b/pyramid/scaffolds/starter/setup.py_tmpl
@@ -6,7 +6,7 @@ here = os.path.abspath(os.path.dirname(__file__))
README = open(os.path.join(here, 'README.txt')).read()
CHANGES = open(os.path.join(here, 'CHANGES.txt')).read()
-requires = ['pyramid', 'WebError']
+requires = ['pyramid', 'pyramid_debugtoolbar', 'WebError']
setup(name='{{project}}',
version='0.0',
diff --git a/pyramid/scaffolds/tests.py b/pyramid/scaffolds/tests.py
index e36943465..d5fcba67c 100644
--- a/pyramid/scaffolds/tests.py
+++ b/pyramid/scaffolds/tests.py
@@ -30,7 +30,6 @@ class TemplateTest(object):
[os.path.join(self.directory, 'bin', 'python'),
'setup.py', 'develop'])
os.chdir(self.directory)
-
subprocess.check_call(['bin/paster', 'create', '-t', tmpl_name,
'Dingle'])
os.chdir('Dingle')
@@ -38,23 +37,31 @@ class TemplateTest(object):
subprocess.check_call([py, 'setup.py', 'install'])
subprocess.check_call([py, 'setup.py', 'test'])
paster = os.path.join(self.directory, 'bin', 'paster')
- proc = subprocess.Popen([paster, 'serve', 'development.ini'])
- try:
- time.sleep(5)
- proc.poll()
- if proc.returncode is not None:
- raise RuntimeError('didnt start')
- conn = httplib.HTTPConnection('localhost:6543')
- conn.request('GET', '/')
- resp = conn.getresponse()
- assert(resp.status == 200)
- finally:
- if hasattr(proc, 'terminate'):
- # 2.6+
- proc.terminate()
- else:
- # 2.5
- os.kill(proc.pid, signal.SIGTERM)
+ for ininame, hastoolbar in (('development.ini', True),
+ ('production.ini', False)):
+ proc = subprocess.Popen([paster, 'serve', ininame])
+ try:
+ time.sleep(5)
+ proc.poll()
+ if proc.returncode is not None:
+ raise RuntimeError('%s didnt start' % ininame)
+ conn = httplib.HTTPConnection('localhost:6543')
+ conn.request('GET', '/')
+ resp = conn.getresponse()
+ assert resp.status == 200, ininame
+ data = resp.read()
+ toolbarchunk = '<div id="flDebug"'
+ if hastoolbar:
+ assert toolbarchunk in data, ininame
+ else:
+ assert not toolbarchunk in data, ininame
+ finally:
+ if hasattr(proc, 'terminate'):
+ # 2.6+
+ proc.terminate()
+ else:
+ # 2.5
+ os.kill(proc.pid, signal.SIGTERM)
finally:
shutil.rmtree(self.directory)
os.chdir(self.old_cwd)
diff --git a/pyramid/scaffolds/zodb/development.ini_tmpl b/pyramid/scaffolds/zodb/development.ini_tmpl
index 730300a82..0ff1a8fb8 100644
--- a/pyramid/scaffolds/zodb/development.ini_tmpl
+++ b/pyramid/scaffolds/zodb/development.ini_tmpl
@@ -7,21 +7,17 @@ pyramid.debug_notfound = false
pyramid.debug_routematch = false
pyramid.debug_templates = true
pyramid.default_locale_name = en
+pyramid.include = pyramid_debugtoolbar
+ pyramid_tm
+pyramid_tm.attempts = 3
zodb_uri = file://%(here)s/Data.fs?connection_cache_size=20000
[pipeline:main]
pipeline =
- egg:WebError#evalerror
egg:repoze.zodbconn#closer
- egg:repoze.retry#retry
- tm
{{project}}
-[filter:tm]
-use = egg:repoze.tm2#tm
-commit_veto = repoze.tm:default_commit_veto
-
[server:main]
use = egg:Paste#http
host = 0.0.0.0
diff --git a/pyramid/scaffolds/zodb/production.ini_tmpl b/pyramid/scaffolds/zodb/production.ini_tmpl
index 9fe8f4741..76a406eb1 100644
--- a/pyramid/scaffolds/zodb/production.ini_tmpl
+++ b/pyramid/scaffolds/zodb/production.ini_tmpl
@@ -7,6 +7,8 @@ pyramid.debug_notfound = false
pyramid.debug_routematch = false
pyramid.debug_templates = false
pyramid.default_locale_name = en
+pyramid.include = pyramid_tm
+pyramid_tm.attempts = 3
zodb_uri = file://%(here)s/Data.fs?connection_cache_size=20000
@@ -24,16 +26,10 @@ debug = false
;smtp_use_tls =
;error_message =
-[filter:tm]
-use = egg:repoze.tm2#tm
-commit_veto = repoze.tm:default_commit_veto
-
[pipeline:main]
pipeline =
weberror
egg:repoze.zodbconn#closer
- egg:repoze.retry#retry
- tm
{{project}}
[server:main]
diff --git a/pyramid/scaffolds/zodb/setup.py_tmpl b/pyramid/scaffolds/zodb/setup.py_tmpl
index 46759b514..87febd524 100644
--- a/pyramid/scaffolds/zodb/setup.py_tmpl
+++ b/pyramid/scaffolds/zodb/setup.py_tmpl
@@ -9,8 +9,8 @@ CHANGES = open(os.path.join(here, 'CHANGES.txt')).read()
requires = [
'pyramid',
'repoze.zodbconn',
- 'repoze.tm2>=1.0b1', # default_commit_veto
- 'repoze.retry',
+ 'pyramid_tm',
+ 'pyramid_debugtoolbar',
'ZODB3',
'WebError',
]