1. Michael Elsdörfer
  2. Flask-Script

Commits

Michael Elsdörfer  committed 72cfc2e

Fix the Server command, which was broken probably due to one of the merges going awry.

  • Participants
  • Parent commits ae02507
  • Branches default

Comments (0)

Files changed (1)

File flaskext/script.py

View file
 
         return options
 
-    def handle(self, app, host, port, use_debugger, use_reloader):
-        # we don't need to run the server in request context
-        # so just run it directly
-
-        app.run(host=host,
+    def run(self, app, host, port, use_debugger, use_reloader):
+        _request_ctx_stack.top.app.run(host=host,
                 port=port,
                 debug=use_debugger,
                 use_debugger=use_debugger,