Make before_first_request a decorator