diff piecrust/serving/wrappers.py @ 1117:e8511fed42a3

serve: Indicate where to find the admin panel in the console output.
author Ludovic Chabant <ludovic@chabant.com>
date Sun, 25 Feb 2018 23:18:47 -0800
parents 6f26e83dfced
children 587bccf72d75
line wrap: on
line diff
--- a/piecrust/serving/wrappers.py	Sun Feb 25 21:48:55 2018 -0800
+++ b/piecrust/serving/wrappers.py	Sun Feb 25 23:18:47 2018 -0800
@@ -100,6 +100,11 @@
     # Disable debugger PIN protection.
     os.environ['WERKZEUG_DEBUG_PIN'] = 'off'
 
+    if is_cmdline_mode:
+        admin_url = 'http://%s:%s%s' % (host, port, '/pc-admin')
+        logger.info("The administrative panel is available at: %s" %
+                    admin_url)
+
     try:
         run_simple(host, port, app,
                    threaded=True,