From 7a3c22a7dcb688a637a6b9a0a317cf46f4d07af2 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Thu, 29 Apr 2010 18:08:51 +0000 Subject: Next release ============ Paster Templates ---------------- - The ``bfg_alchemy`` and ``bfg_routesalchemy`` templates no longer register a ``handle_teardown`` event listener which calls ``DBSession.remove``. This was found by Chris Withers to be unnecessary. Documentation ------------- - The "bfgwiki2" (URL dispatch wiki) tutorial code and documentation was changed to remove the ``handle_teardown`` event listener which calls ``DBSession.remove``. - Any mention of the ``handle_teardown`` event listener as used by the paster templates was removed from the URL Dispatch narrative chapter. --- repoze/bfg/paster_templates/alchemy/+package+/configure.zcml | 4 ---- repoze/bfg/paster_templates/alchemy/+package+/run.py_tmpl | 11 ----------- .../paster_templates/routesalchemy/+package+/configure.zcml | 3 --- .../bfg/paster_templates/routesalchemy/+package+/run.py_tmpl | 11 ----------- 4 files changed, 29 deletions(-) (limited to 'repoze') 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" /> - - 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 @@ - -