From 19d32cb17285e2614d8aecbf4b0f63cfdac629cf Mon Sep 17 00:00:00 2001 From: Ron DuPlain Date: Mon, 16 Jan 2012 23:33:13 -0500 Subject: [PATCH] Update Flask.run signature, note defaults. --- flask/app.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/flask/app.py b/flask/app.py index b70162c1..26519d40 100644 --- a/flask/app.py +++ b/flask/app.py @@ -664,7 +664,7 @@ class Flask(_PackageBoundObject): # existing views. context.update(orig_ctx) - def run(self, host='127.0.0.1', port=5000, debug=None, **options): + def run(self, host=None, port=None, debug=None, **options): """Runs the application on a local development server. If the :attr:`debug` flag is set the server will automatically reload for code changes and show a debugger in case an exception happened. @@ -684,9 +684,10 @@ class Flask(_PackageBoundObject): won't catch any exceptions because there won't be any to catch. - :param host: the hostname to listen on. set this to ``'0.0.0.0'`` - to have the server available externally as well. - :param port: the port of the webserver + :param host: the hostname to listen on. Set this to ``'0.0.0.0'`` to + have the server available externally as well. Defaults to + ``'127.0.0.1'``. + :param port: the port of the webserver. Defaults to ``5000``. :param debug: if given, enable or disable debug mode. See :attr:`debug`. :param options: the options to be forwarded to the underlying