diff options
author | Frederic Junod <frederic.junod@camptocamp.com> | 2012-07-16 12:34:54 +0200 |
---|---|---|
committer | Frederic Junod <frederic.junod@camptocamp.com> | 2012-07-16 12:37:48 +0200 |
commit | 7a7367fe0bf443e5cf66b6c938023d37a5c82389 (patch) | |
tree | 361a39305ef3b301de9ee1a01666628d09bee5c8 | |
parent | 566239e883a5149225c23f411f279bacf25c1527 (diff) | |
download | bottle-7a7367fe0bf443e5cf66b6c938023d37a5c82389.tar.gz |
Parameter order of Bottle.mount() changed in 8b023afd; update tutorial
-rwxr-xr-x | docs/tutorial.rst | 4 |
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. |