# HG changeset patch # User Ludovic Chabant # Date 1443153698 25200 # Node ID af8802303e30f1d46f5fac432361577715be0bb6 # Parent c48e7a87258db0f2bd9679bb08cfd4da4eb9a5b2 web: Make "Preview" button work in the edit page. diff -r c48e7a87258d -r af8802303e30 wikked/templates/edit-page.html --- a/wikked/templates/edit-page.html Thu Sep 24 20:47:25 2015 -0700 +++ b/wikked/templates/edit-page.html Thu Sep 24 21:01:38 2015 -0700 @@ -45,7 +45,7 @@
- + Cancel
diff -r c48e7a87258d -r af8802303e30 wikked/views/edit.py --- a/wikked/views/edit.py Thu Sep 24 20:47:25 2015 -0700 +++ b/wikked/views/edit.py Thu Sep 24 21:01:38 2015 -0700 @@ -51,7 +51,9 @@ if request.method == 'GET': author = user or request.remote_addr - custom_data = {'post_back': '/edit/' + url.lstrip('/')} + custom_data = { + 'post_back': '/edit/' + url.lstrip('/'), + 'preview_url': url} data = get_edit_page(wiki, user, url, author=author, custom_data=custom_data) add_auth_data(data)