Return a callable that relays calls to the current default app.
(name)
| 2704 | # They all refer to the current default application. |
| 2705 | |
| 2706 | def make_default_app_wrapper(name): |
| 2707 | ''' Return a callable that relays calls to the current default app. ''' |
| 2708 | @functools.wraps(getattr(Bottle, name)) |
| 2709 | def wrapper(*a, **ka): |
| 2710 | return getattr(app(), name)(*a, **ka) |
| 2711 | return wrapper |
| 2712 | |
| 2713 | route = make_default_app_wrapper('route') |
| 2714 | get = make_default_app_wrapper('get') |