From df929c6c77ea5490a969275e45075c29711a498c Mon Sep 17 00:00:00 2001 From: Armin Ronacher Date: Sun, 11 Apr 2010 02:58:13 +0200 Subject: [PATCH] further improved documentation --- docs/quickstart.rst | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/docs/quickstart.rst b/docs/quickstart.rst index c5bb19d3..f271d9a1 100644 --- a/docs/quickstart.rst +++ b/docs/quickstart.rst @@ -52,6 +52,30 @@ So what did that code do? makes sure the server only runs if the script is executed directly from the Python interpreter and not used as imported module. +To stop the server, hit control-C. + + +Debug Mode +---------- + +Now that :meth:`~flask.Flask.run` method is nice to start a local +development server, but you would have to restart it manually after each +change you do to code. That is not very nice and Flask can do better. If +you enable the debug support the server will reload itself on code changes +and also provide you with a helpful debugger if things go wrong. + +There are two ways to enable debugging. Either set that flag on the +applciation object:: + + app.debug = True + app.run() + +Or pass it to run:: + + app.run(debug=True) + +Both will have exactly the same effect. + Routing -------