summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAtsushi Odagiri <aodagx@gmail.com>2011-06-30 21:14:09 +0900
committerAtsushi Odagiri <aodagx@gmail.com>2011-07-03 03:12:04 +0900
commit1c6fd879acaf2461c78263b2c21711c65ed668ed (patch)
treed9baaf600441e12f6dbe88e971940f7fe227475b
parentda780fb9adbb5be06b8e2a115e04b0a533c90629 (diff)
downloadpyramid-1c6fd879acaf2461c78263b2c21711c65ed668ed.tar.gz
pyramid-1c6fd879acaf2461c78263b2c21711c65ed668ed.tar.bz2
pyramid-1c6fd879acaf2461c78263b2c21711c65ed668ed.zip
use with includeme
-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,