Flask-Script
Flask-Script copied to clipboard
missing before_request trigger
I've found it useful to have before_request triggered before shell execution. It's even more important as teardown_request is automatically executed by exit() from shell.
diff --git a/flaskext/script.py b/flaskext/script.py index 5a3996f..2ff3148 100644 --- a/flaskext/script.py +++ b/flaskext/script.py @@ -190,7 +190,9 @@ class Command(object): a test request context. """ with app.test_request_context():
-
app.preprocess_request() self.run(_args, *_kwargs) -
app.process_response(app.response_class())def run(self):