Method: flask.blueprints.Blueprint.register_blueprint
Calls: 11, Exceptions: 1, Paths: 2Back
Path 1: 10 calls (0.91)
Blueprint (10)
{'url_prefix': '/child'} (4) {} (3) {'url_prefix': '/grandchild'} (1) {'url_prefix': None} (1) {'url_prefix': '/a', 'name': 'sub'} (1)
1@setupmethod
2 def register_blueprint(self, blueprint: Blueprint, **options: t.Any) -> None:
3 """Register a :class:`~flask.Blueprint` on this blueprint. Keyword
4 arguments passed to this method will override the defaults set
5 on the blueprint.
6
7 .. versionchanged:: 2.0.1
8 The ``name`` option can be used to change the (pre-dotted)
9 name the blueprint is registered with. This allows the same
10 blueprint to be registered multiple times with unique names
11 for ``url_for``.
12
13 .. versionadded:: 2.0
14 """
15 if blueprint is self:
16 raise ValueError("Cannot register a blueprint on itself")
17 self._blueprints.append((blueprint, options))
Path 2: 1 calls (0.09)
Blueprint (1)
{} (1)
ValueError (1)
1@setupmethod
2 def register_blueprint(self, blueprint: Blueprint, **options: t.Any) -> None:
3 """Register a :class:`~flask.Blueprint` on this blueprint. Keyword
4 arguments passed to this method will override the defaults set
5 on the blueprint.
6
7 .. versionchanged:: 2.0.1
8 The ``name`` option can be used to change the (pre-dotted)
9 name the blueprint is registered with. This allows the same
10 blueprint to be registered multiple times with unique names
11 for ``url_for``.
12
13 .. versionadded:: 2.0
14 """
15 if blueprint is self:
16 raise ValueError("Cannot register a blueprint on itself")
17 self._blueprints.append((blueprint, options))