mitsuhiko/flask — pull request #940 by Tim-Erwin (2014-01-02 17:16:41+00:00)
Title: fix @before_first_request rasing exception

I tried using @before_first_request but ran into an AssertionError in @setupmethod because before actually executing the functions app.\_got_first_request was set to True indicating it's already too late. So I just moved it after the execution of the functions. Also I made the decorator leave the functions intact so they could be used directly.