Reset all routes (force plugins to be re-applied) and clear all caches. If an ID or route object is given, only that specific route is affected.
(self, route=None)
| 827 | return removed |
| 828 | |
| 829 | def reset(self, route=None): |
| 830 | """ Reset all routes (force plugins to be re-applied) and clear all |
| 831 | caches. If an ID or route object is given, only that specific route |
| 832 | is affected. """ |
| 833 | if route is None: routes = self.routes |
| 834 | elif isinstance(route, Route): routes = [route] |
| 835 | else: routes = [self.routes[route]] |
| 836 | for route in routes: |
| 837 | route.reset() |
| 838 | if DEBUG: |
| 839 | for route in routes: |
| 840 | route.prepare() |
| 841 | self.trigger_hook('app_reset') |
| 842 | |
| 843 | def close(self): |
| 844 | """ Close the application and all installed plugins. """ |
no test coverage detected