diff options
Diffstat (limited to 'repoze')
4 files changed, 0 insertions, 29 deletions
diff --git a/repoze/bfg/paster_templates/alchemy/+package+/configure.zcml b/repoze/bfg/paster_templates/alchemy/+package+/configure.zcml index 40b863c62..521f06ba4 100644 --- a/repoze/bfg/paster_templates/alchemy/+package+/configure.zcml +++ b/repoze/bfg/paster_templates/alchemy/+package+/configure.zcml @@ -20,8 +20,4 @@ path="templates/static" /> - <subscriber for="repoze.bfg.interfaces.INewRequest" - handler=".run.handle_teardown" - /> - </configure> diff --git a/repoze/bfg/paster_templates/alchemy/+package+/run.py_tmpl b/repoze/bfg/paster_templates/alchemy/+package+/run.py_tmpl index 6ce86371b..3c2711028 100644 --- a/repoze/bfg/paster_templates/alchemy/+package+/run.py_tmpl +++ b/repoze/bfg/paster_templates/alchemy/+package+/run.py_tmpl @@ -1,17 +1,6 @@ -import transaction - from repoze.bfg.configuration import Configurator -from repoze.tm import after_end -from repoze.tm import isActive from {{package}}.models import appmaker -from {{package}}.models import DBSession - -def handle_teardown(event): - environ = event.request.environ - if isActive(environ): - t = transaction.get() - after_end.register(DBSession.remove, t) def app(global_config, **settings): """ This function returns a WSGI application. diff --git a/repoze/bfg/paster_templates/routesalchemy/+package+/configure.zcml b/repoze/bfg/paster_templates/routesalchemy/+package+/configure.zcml index 954be6bf8..1a8d3e0bf 100644 --- a/repoze/bfg/paster_templates/routesalchemy/+package+/configure.zcml +++ b/repoze/bfg/paster_templates/routesalchemy/+package+/configure.zcml @@ -3,9 +3,6 @@ <!-- this must be included for the view declarations to work --> <include package="repoze.bfg.includes" /> - <subscriber for="repoze.bfg.interfaces.INewRequest" - handler=".run.handle_teardown"/> - <route path="" name="home" diff --git a/repoze/bfg/paster_templates/routesalchemy/+package+/run.py_tmpl b/repoze/bfg/paster_templates/routesalchemy/+package+/run.py_tmpl index c4d37238a..61cc461cb 100644 --- a/repoze/bfg/paster_templates/routesalchemy/+package+/run.py_tmpl +++ b/repoze/bfg/paster_templates/routesalchemy/+package+/run.py_tmpl @@ -1,18 +1,7 @@ -import transaction - from repoze.bfg.configuration import Configurator -from repoze.tm import after_end -from repoze.tm import isActive -from {{package}}.models import DBSession from {{package}}.models import initialize_sql -def handle_teardown(event): - environ = event.request.environ - if isActive(environ): - t = transaction.get() - after_end.register(DBSession.remove, t) - def app(global_config, **settings): """ This function returns a WSGI application. |
