Browse Source

further improved documentation

pull/1638/head
Armin Ronacher 15 years ago
parent
commit
df929c6c77
  1. 24
      docs/quickstart.rst

24
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 makes sure the server only runs if the script is executed directly from
the Python interpreter and not used as imported module. 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 Routing
------- -------

Loading…
Cancel
Save