summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pyramid/config.py10
1 files 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,