further improved documentation

This commit is contained in:
Armin Ronacher 2010-04-11 02:58:13 +02:00
parent 574e81f9c8
commit df929c6c77

View file

@ -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
-------