changeset 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 40228511d600
children 1dcebff866f1
files piecrust/serving/wrappers.py
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
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,