(self, catchall=True, autojson=True)
| 587 | """ |
| 588 | |
| 589 | def __init__(self, catchall=True, autojson=True): |
| 590 | |
| 591 | #: A :class:`ConfigDict` for app specific configuration. |
| 592 | self.config = ConfigDict() |
| 593 | self.config._on_change = functools.partial(self.trigger_hook, 'config') |
| 594 | self.config.meta_set('autojson', 'validate', bool) |
| 595 | self.config.meta_set('catchall', 'validate', bool) |
| 596 | self.config['catchall'] = catchall |
| 597 | self.config['autojson'] = autojson |
| 598 | |
| 599 | #: A :class:`ResourceManager` for application files |
| 600 | self.resources = ResourceManager() |
| 601 | |
| 602 | self.routes = [] # List of installed :class:`Route` instances. |
| 603 | self.router = Router() # Maps requests to :class:`Route` instances. |
| 604 | self.error_handler = {} |
| 605 | |
| 606 | # Core plugins |
| 607 | self.plugins = [] # List of installed plugins. |
| 608 | if self.config['autojson']: |
| 609 | self.install(JSONPlugin()) |
| 610 | self.install(TemplatePlugin()) |
| 611 | |
| 612 | #: If true, most exceptions are caught and returned as :exc:`HTTPError` |
| 613 | catchall = DictProperty('config', 'catchall') |
nothing calls this directly
no test coverage detected