summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pyramid/configuration.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/pyramid/configuration.py b/pyramid/configuration.py
index 8d9a3780d..a6b712d99 100644
--- a/pyramid/configuration.py
+++ b/pyramid/configuration.py
@@ -267,12 +267,6 @@ class Configurator(object):
session_factory=session_factory,
)
- @classmethod
- def with_context(cls, context):
- configurator = cls(registry=context.registry, package=context.package)
- configurator._ctx = context
- return configurator
-
def _action(self, discriminator, callable=None, args=(), kw=None, order=0):
""" Register an action which will be executed during a commit. """
if kw is None:
@@ -401,6 +395,12 @@ class Configurator(object):
self._ctx.execute_actions()
self._ctx = self._make_context(self._ctx.autocommit)
+ @classmethod
+ def with_context(cls, context):
+ configurator = cls(registry=context.registry, package=context.package)
+ configurator._ctx = context
+ return configurator
+
def with_package(self, package, _ctx=None):
""" Return a new Configurator instance with the same registry
as this configurator using the package supplied as the