diff piecrust/admin/views/publish.py @ 952:94fd4f07da83

admin: Fix more URL prefix issues, improve publishing.
author Ludovic Chabant <ludovic@chabant.com>
date Thu, 05 Oct 2017 00:29:14 -0700
parents 5b4c02ed9bb2
children b1a00c2c0c7f
line wrap: on
line diff
--- a/piecrust/admin/views/publish.py	Thu Oct 05 00:28:34 2017 -0700
+++ b/piecrust/admin/views/publish.py	Thu Oct 05 00:29:14 2017 -0700
@@ -28,6 +28,12 @@
         with_base_data(data)
         return render_template('error.html', **data)
 
+    try:
+        with open(site.publish_log_file, 'r') as fp:
+            last_pub_log = fp.read()
+    except OSError:
+        last_pub_log = None
+
     data = {}
     data['url_run'] = url_for('.publish')
     data['site_title'] = site.piecrust_app.config.get('site/title',
@@ -43,6 +49,8 @@
             'description': desc
         })
 
+    data['last_log'] = last_pub_log
+
     with_menu_context(data)
 
     return render_template('publish.html', **data)