Mercurial > piecrust2
diff piecrust/commands/builtin/serving.py @ 135:50b65c700c96
Don't use Werkzeug's reloader in non-debug mode unless we ask for it.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Tue, 25 Nov 2014 22:37:06 -0800 |
parents | f485ba500df3 |
children | f3aa511eef99 |
line wrap: on
line diff
--- a/piecrust/commands/builtin/serving.py Tue Nov 25 22:36:40 2014 -0800 +++ b/piecrust/commands/builtin/serving.py Tue Nov 25 22:37:06 2014 -0800 @@ -19,12 +19,16 @@ parser.add_argument('-a', '--address', help="The host for the web server", default='localhost') + parser.add_argument('--use-reloader', + help="Restart the server when PieCrust code changes", + action='store_true') def run(self, ctx): server = Server( ctx.app.root_dir, host=ctx.args.address, port=ctx.args.port, - debug=ctx.args.debug) + debug=ctx.args.debug, + use_reloader=ctx.args.use_reloader) server.run()