changeset 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 942565723e99
children f13d618cfec6
files piecrust/commands/builtin/serving.py
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
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)