Merge pull request #446 from jtsoi/patch-1

Debug example with run_simple and flask app.
This commit is contained in:
Ron DuPlain 2012-04-01 08:37:44 -07:00
commit 8740fff907

View file

@ -30,6 +30,23 @@ at :func:`werkzeug.serving.run_simple`::
Note that :func:`run_simple <werkzeug.serving.run_simple>` is not intended for
use in production. Use a :ref:`full-blown WSGI server <deployment>`.
In order to use the interactive debuggger, debugging must be enables both on
the application and the simple server, here is the "hello world" example with debugging and
:func:`run_simple <werkzeug.serving.run_simple>` :
from flask import Flask
from werkzeug.serving import run_simple
app = Flask(__name__)
app.debug = True
@app.route('/')
def hello_world():
return 'Hello World!'
if __name__ == '__main__':
run_simple('localhost', 5000, app, use_reloader=True, use_debugger=True, use_evalex=True)
Combining Applications
----------------------