From 46c24da0162208ddc82ea755347967e4162b97c3 Mon Sep 17 00:00:00 2001 From: Armin Ronacher Date: Sat, 8 Feb 2014 17:39:26 +0000 Subject: [PATCH] Make before_first_request a decorator --- CHANGES | 1 + flask/app.py | 1 + 2 files changed, 2 insertions(+) diff --git a/CHANGES b/CHANGES index 656b9356..0737c590 100644 --- a/CHANGES +++ b/CHANGES @@ -16,6 +16,7 @@ Version 0.10.2 context to be passed to teardown handlers. - Fixed an issue with query parameters getting removed from requests in the test client when absolute URLs were requested. +- Made `@before_first_request` into a decorator as intended. Version 0.10.1 -------------- diff --git a/flask/app.py b/flask/app.py index 8827fcdb..c3170df6 100644 --- a/flask/app.py +++ b/flask/app.py @@ -1205,6 +1205,7 @@ class Flask(_PackageBoundObject): .. versionadded:: 0.8 """ self.before_first_request_funcs.append(f) + return f @setupmethod def after_request(self, f):