changelog for blueprint registered name
Before adoption: this commit came in with the history the project adopted, so no landing records it.
authored by David Lord · committed by pgjones · parent 67b0b7e · Browse files · 3 files·+30 added−0 removed
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Diff stats
3 files+30 added−0 removed
- other:+30 added−0 removed
Provenance
- Commit
63b3067- Tree
de8dfb1- Author
David Lord <davidism@gmail.com>- Committer
pgjones <philip.graham.jones@googlemail.com>- Parent
67b0b7e
3 files changed+30 added−0 removed
modified:src/flask/app.py+6 added
1017 unmodified lines1018 :param options: Additional keyword arguments are passed to1019 :class:`~flask.blueprints.BlueprintSetupState`. They can be1020 accessed in :meth:`~flask.Blueprint.record` callbacks.1021 1022+ .. versionchanged:: 2.0.11023+ The ``name`` option can be used to change the (pre-dotted)1024+ name the blueprint is registered with. This allows the same1025+ blueprint to be registered multiple times with unique names1026+ for ``url_for``.1027+1028 .. versionadded:: 0.71029 """1030 blueprint.register(self, options)1031 1057 unmodified linesmodified:src/flask/blueprints.py+17 added
250 unmodified lines251 """Register a :class:`~flask.Blueprint` on this blueprint. Keyword252 arguments passed to this method will override the defaults set253 on the blueprint.254 255+ .. versionchanged:: 2.0.1256+ The ``name`` option can be used to change the (pre-dotted)257+ name the blueprint is registered with. This allows the same258+ blueprint to be registered multiple times with unique names259+ for ``url_for``.260+261 .. versionadded:: 2.0262 """263 self._blueprints.append((blueprint, options))264 6 unmodified lines271 :param app: The application this blueprint is being registered272 with.273 :param options: Keyword arguments forwarded from274 :meth:`~Flask.register_blueprint`.275+276+ .. versionchanged:: 2.0.1277+ Nested blueprints are registered with their dotted name.278+ This allows different blueprints with the same name to be279+ nested at different locations.280+281+ .. versionchanged:: 2.0.1282+ The ``name`` option can be used to change the (pre-dotted)283+ name the blueprint is registered with. This allows the same284+ blueprint to be registered multiple times with unique names285+ for ``url_for``.286 """287 first_registration = True288 289 for blueprint in app.blueprints.values():298 unmodified linesmodified:CHANGES.rst+7 added
25 unmodified lines26 - Re-add deprecated ``Config.from_json``, which was accidentally27 removed early. :issue:`4078`28 - Improve typing for some functions using ``Callable`` in their type29 signatures, focusing on decorator factories. :issue:`4060`30+- Nested blueprints are registered with their dotted name. This allows31+ different blueprints with the same name to be nested at different32+ locations. :issue:`4069`33+- ``register_blueprint`` takes a ``name`` option to change the34+ (pre-dotted) name the blueprint is registered with. This allows the35+ same blueprint to be registered multiple times with unique names for36+ ``url_for``. :issue:`1091`37 38 39 Version 2.0.040 -------------1116 unmodified lines