# HG changeset patch # User Ludovic Chabant # Date 1499058947 25200 # Node ID f77f9dcba072c08b0b976cc759dd1df54c49e5d2 # Parent 942565723e999e0df9727d16edc8f6e6e20b6379 serve: Optionally run the admin panel with the server. diff -r 942565723e99 -r f77f9dcba072 piecrust/commands/builtin/serving.py --- 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)