| 465 | ''' |
| 466 | |
| 467 | def __init__(self, app, rule, method, callback, name=None, |
| 468 | plugins=None, skiplist=None, **config): |
| 469 | #: The application this route is installed to. |
| 470 | self.app = app |
| 471 | #: The path-rule string (e.g. ``/wiki/:page``). |
| 472 | self.rule = rule |
| 473 | #: The HTTP method as a string (e.g. ``GET``). |
| 474 | self.method = method |
| 475 | #: The original callback with no plugins applied. Useful for introspection. |
| 476 | self.callback = callback |
| 477 | #: The name of the route (if specified) or ``None``. |
| 478 | self.name = name or None |
| 479 | #: A list of route-specific plugins (see :meth:`Bottle.route`). |
| 480 | self.plugins = plugins or [] |
| 481 | #: A list of plugins to not apply to this route (see :meth:`Bottle.route`). |
| 482 | self.skiplist = skiplist or [] |
| 483 | #: Additional keyword arguments passed to the :meth:`Bottle.route` |
| 484 | #: decorator are stored in this dictionary. Used for route-specific |
| 485 | #: plugin configuration and meta-data. |
| 486 | self.config = ConfigDict().load_dict(config, make_namespaces=True) |
| 487 | |
| 488 | def __call__(self, *a, **ka): |
| 489 | depr("Some APIs changed to return Route() instances instead of"\ |