summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel Hellkamp <marc@gsites.de>2012-07-16 04:43:32 -0700
committerMarcel Hellkamp <marc@gsites.de>2012-07-16 04:43:32 -0700
commite4294a327855c5b522db686b91f54cca6be7e54b (patch)
tree361a39305ef3b301de9ee1a01666628d09bee5c8
parent566239e883a5149225c23f411f279bacf25c1527 (diff)
parent7a7367fe0bf443e5cf66b6c938023d37a5c82389 (diff)
downloadbottle-e4294a327855c5b522db686b91f54cca6be7e54b.tar.gz
Merge pull request #350 from fredj/docs
Parameter order of Bottle.mount() changed in 8b023afd; update tutorial
-rwxr-xr-xdocs/tutorial.rst4
1 files changed, 2 insertions, 2 deletions
diff --git a/docs/tutorial.rst b/docs/tutorial.rst
index 7ada656..d0cf2ab 100755
--- a/docs/tutorial.rst
+++ b/docs/tutorial.rst
@@ -754,7 +754,7 @@ Plugins and Sub-Applications
Most plugins are specific to the application they were installed to. Consequently, they should not affect sub-applications mounted with :meth:`Bottle.mount`. Here is an example::
root = Bottle()
- root.mount(apps.blog, '/blog')
+ root.mount('/blog', apps.blog)
@root.route('/contact', template='contact')
def contact():
@@ -766,7 +766,7 @@ Whenever you mount an application, Bottle creates a proxy-route on the main-appl
This behavior is intended as a sane default, but can be overridden. The following example re-activates all plugins for a specific proxy-route::
- root.mount(apps.blog, '/blog', skip=None)
+ root.mount('/blog', apps.blog, skip=None)
But there is a snag: The plugin sees the whole sub-application as a single route, namely the proxy-route mentioned above. In order to affect each individual route of the sub-application, you have to install the plugin to the mounted application explicitly.