From 1c6fd879acaf2461c78263b2c21711c65ed668ed Mon Sep 17 00:00:00 2001 From: Atsushi Odagiri Date: Thu, 30 Jun 2011 21:14:09 +0900 Subject: use with includeme --- pyramid/config.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/pyramid/config.py b/pyramid/config.py index 4143f5296..31cd44222 100644 --- a/pyramid/config.py +++ b/pyramid/config.py @@ -601,6 +601,7 @@ class Configurator(object): context.includepath = _context.includepath + (spec,) context.package = package_of(module) config = self.__class__.with_context(context) + config.root_route_name = self.root_route_name c(config) def with_root_route(self, route_name): @@ -1561,10 +1562,13 @@ class Configurator(object): root_route_name=route_name) return configurator - def mount(self, function, route_name): - function = self.maybe_dotted(function) + def mount(self, includeme, route_name): + """ mount subapplication on route named ``route_name``. + """ + config = self.with_root_route(route_name) - function(config) + config.include(includeme) + @action_method def add_route(self, -- cgit v1.2.3