MCPcopy
hub / github.com/pallets/flask / teardown_app_request

Method teardown_app_request

src/flask/sansio/blueprints.py:574–581  ·  view source on GitHub ↗

Like :meth:`teardown_request`, but after every request, not only those handled by the blueprint. Equivalent to :meth:`.Flask.teardown_request`.

(self, f: T_teardown)

Source from the content-addressed store, hash-verified

572
573 @setupmethod
574 def teardown_app_request(self, f: T_teardown) -> T_teardown:
575 """Like :meth:`teardown_request`, but after every request, not only those
576 handled by the blueprint. Equivalent to :meth:`.Flask.teardown_request`.
577 """
578 self.record_once(
579 lambda s: s.app.teardown_request_funcs.setdefault(None, []).append(f)
580 )
581 return f
582
583 @setupmethod
584 def app_context_processor(

Callers

nothing calls this directly

Calls 2

record_onceMethod · 0.95
setdefaultMethod · 0.80

Tested by

no test coverage detected