Register a :class:`~flask.Blueprint` on the application. Keyword arguments passed to this method will override the defaults set on the blueprint. Calls the blueprint's :meth:`~flask.Blueprint.register` method after recording the blueprint in the application's :attr:`
(self, blueprint: Blueprint, **options: t.Any)
| 568 | |
| 569 | @setupmethod |
| 570 | def register_blueprint(self, blueprint: Blueprint, **options: t.Any) -> None: |
| 571 | class="st">"""Register a :class:`~flask.Blueprint` on the application. Keyword |
| 572 | arguments passed to this method will override the defaults set on the |
| 573 | blueprint. |
| 574 | |
| 575 | Calls the blueprint&class="cm">#x27;s :meth:`~flask.Blueprint.register` method after |
| 576 | recording the blueprint in the application&class="cm">#x27;s :attr:`blueprints`. |
| 577 | |
| 578 | :param blueprint: The blueprint to register. |
| 579 | :param url_prefix: Blueprint routes will be prefixed with this. |
| 580 | :param subdomain: Blueprint routes will match on this subdomain. |
| 581 | :param url_defaults: Blueprint routes will use these default values for |
| 582 | view arguments. |
| 583 | :param options: Additional keyword arguments are passed to |
| 584 | :class:`~flask.blueprints.BlueprintSetupState`. They can be |
| 585 | accessed in :meth:`~flask.Blueprint.record` callbacks. |
| 586 | |
| 587 | .. versionchanged:: 2.0.1 |
| 588 | The ``name`` option can be used to change the (pre-dotted) |
| 589 | name the blueprint is registered with. This allows the same |
| 590 | blueprint to be registered multiple times with unique names |
| 591 | for ``url_for``. |
| 592 | |
| 593 | .. versionadded:: 0.7 |
| 594 | class="st">""" |
| 595 | blueprint.register(self, options) |
| 596 | |
| 597 | def iter_blueprints(self) -> t.ValuesView[Blueprint]: |
| 598 | class="st">"""Iterates over all blueprints by the order they were registered. |