(self, prefix, app, **options)
| 737 | self.route('/' + '/'.join(segments), **options) |
| 738 | |
| 739 | def _mount_app(self, prefix, app, **options): |
| 740 | if app in self._mounts or '_mount.app' in app.config: |
| 741 | depr(0, 13, "Application mounted multiple times. Falling back to WSGI mount.", |
| 742 | "Clone application before mounting to a different location.") |
| 743 | return self._mount_wsgi(prefix, app, **options) |
| 744 | |
| 745 | if options: |
| 746 | depr(0, 13, "Unsupported mount options. Falling back to WSGI mount.", |
| 747 | "Do not specify any route options when mounting bottle application.") |
| 748 | return self._mount_wsgi(prefix, app, **options) |
| 749 | |
| 750 | if not prefix.endswith("/"): |
| 751 | depr(0, 13, "Prefix must end in '/'. Falling back to WSGI mount.", |
| 752 | "Consider adding an explicit redirect from '/prefix' to '/prefix/' in the parent application.") |
| 753 | return self._mount_wsgi(prefix, app, **options) |
| 754 | |
| 755 | self._mounts.append(app) |
| 756 | app.config['_mount.prefix'] = prefix |
| 757 | app.config['_mount.app'] = self |
| 758 | for route in app.routes: |
| 759 | route.rule = prefix + route.rule.lstrip('/') |
| 760 | self.add_route(route) |
| 761 | |
| 762 | def mount(self, prefix, app, **options): |
| 763 | """ Mount an application (:class:`Bottle` or plain WSGI) to a specific |
no test coverage detected