changeset 1:37aa641facaf

Fixed title for history page.
author Ludovic Chabant <ludovic@chabant.com>
date Tue, 11 Dec 2012 22:13:10 -0800
parents c946f4facfa2
children f8b3a6dc65af
files wikked/views.py
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/wikked/views.py	Mon Dec 10 22:40:52 2012 -0800
+++ b/wikked/views.py	Tue Dec 11 22:13:10 2012 -0800
@@ -125,6 +125,7 @@
 
 @app.route('/api/history/<path:url>')
 def api_page_history(url):
+    page = get_page_or_404(url)
     history = wiki.getPageHistory(url)
     hist_data = []
     for i, rev in enumerate(reversed(history)):
@@ -136,6 +137,6 @@
             'timestamp': rev.timestamp,
             'description': rev.description
             })
-    result = { 'url': url, 'history': hist_data }
+    result = { 'url': url, 'title': page.title, 'history': hist_data }
     return jsonify(result)