Mercurial > piecrust2
diff piecrust/commands/builtin/serving.py @ 890:f77f9dcba072
serve: Optionally run the admin panel with the server.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Sun, 02 Jul 2017 22:15:47 -0700 |
parents | 4850f8c21b6e |
children | 33a89139c284 |
line wrap: on
line diff
--- a/piecrust/commands/builtin/serving.py Sun Jul 02 22:15:13 2017 -0700 +++ b/piecrust/commands/builtin/serving.py Sun Jul 02 22:15:47 2017 -0700 @@ -30,6 +30,10 @@ help="Show the debugger when an error occurs", action='store_true') parser.add_argument( + '--admin', + help="Also serve the administration panel.", + action='store_true') + parser.add_argument( '--wsgi', help="The WSGI server implementation to use", choices=['werkzeug', 'gunicorn'], @@ -45,6 +49,7 @@ from piecrust.serving.wrappers import run_werkzeug_server run_werkzeug_server( appfactory, host, port, + serve_admin=ctx.args.admin, use_debugger=debug, use_reloader=ctx.args.use_reloader)