(self, **kwargs)
| 615 | return cfg |
| 616 | |
| 617 | def __init__(self, **kwargs): |
| 618 | #: A :class:`ConfigDict` for app specific configuration. |
| 619 | self.config = self._global_config._make_overlay() |
| 620 | self.config._add_change_listener( |
| 621 | functools.partial(self.trigger_hook, 'config')) |
| 622 | |
| 623 | self.config.update({ |
| 624 | "catchall": True |
| 625 | }) |
| 626 | |
| 627 | if kwargs.get('catchall') is False: |
| 628 | depr(0, 13, "Bottle(catchall) keyword argument.", |
| 629 | "The 'catchall' setting is now part of the app " |
| 630 | "configuration. Fix: `app.config['catchall'] = False`") |
| 631 | self.config['catchall'] = False |
| 632 | if kwargs.get('autojson') is False: |
| 633 | depr(0, 13, "Bottle(autojson) keyword argument.", |
| 634 | "The 'autojson' setting is now part of the app " |
| 635 | "configuration. Fix: `app.config['json.enable'] = False`") |
| 636 | self.config['json.disable'] = True |
| 637 | |
| 638 | self._mounts = [] |
| 639 | |
| 640 | #: A :class:`ResourceManager` for application files |
| 641 | self.resources = ResourceManager() |
| 642 | |
| 643 | self.routes = [] # List of installed :class:`Route` instances. |
| 644 | self.router = Router() # Maps requests to :class:`Route` instances. |
| 645 | self.error_handler = {} |
| 646 | |
| 647 | # Core plugins |
| 648 | self.plugins = [] # List of installed plugins. |
| 649 | self.install(JSONPlugin()) |
| 650 | self.install(TemplatePlugin()) |
| 651 | |
| 652 | #: If true, most exceptions are caught and returned as :exc:`HTTPError` |
| 653 | catchall = DictProperty('config', 'catchall') |
nothing calls this directly
no test coverage detected