Mercurial > farol > farol
diff farol/document.py @ 67:023080ffd995
Allow deletion of revisions
author | Benoît Allard <benoit.allard@greenbone.net> |
---|---|
date | Thu, 09 Oct 2014 09:50:57 +0200 |
parents | f1705e90695b |
children | 33cdb9faed64 |
line wrap: on
line diff
--- a/farol/document.py Thu Oct 09 09:48:05 2014 +0200 +++ b/farol/document.py Thu Oct 09 09:50:57 2014 +0200 @@ -142,6 +142,13 @@ tracking._currentDate = date return redirect(url_for('.view')) +@document.route('/revision/del', methods=['POST']) +@document_required +def del_revision(): + index = int(request.form['index']) + del get_current()._tracking._history[index] + return redirect(url_for('.view')) + @document.route('/distribution/edit', methods=['GET', 'POST']) @document_required def edit_distribution():