Flask-Script icon indicating copy to clipboard operation
Flask-Script copied to clipboard

missing before_request trigger

Open munhitsu opened this issue 14 years ago • 0 comments

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):

munhitsu avatar Dec 13 '11 23:12 munhitsu