Fix callback order for nested blueprints

Handlers registered via url_value_preprocessor, before_request,
context_processor, and url_defaults are called in downward order: First
on the app and last on the current blueprint.

Handlers registered via after_request and teardown_request are called
in upward order: First on the current blueprint and last on the app.
This commit is contained in:
Matthias Paulsen 2021-08-10 00:23:57 +02:00 committed by David Lord
parent 4346498c85
commit 166a2a6207
No known key found for this signature in database
GPG key ID: 7A1C87E3F5BC42A8
3 changed files with 105 additions and 26 deletions

View file

@ -21,6 +21,9 @@ Unreleased
:issue:`4096`
- The CLI loader handles ``**kwargs`` in a ``create_app`` function.
:issue:`4170`
- Fix the order of ``before_request`` and other callbacks that trigger
before the view returns. They are called from the app down to the
closest nested blueprint. :issue:`4229`
Version 2.0.1