From 95c196076becb0c1ba23a93171e0c25497ba107c Mon Sep 17 00:00:00 2001 From: Edward Betts Date: Wed, 7 Jun 2017 13:30:56 +0100 Subject: [PATCH] add title method --- sourcing/view.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/sourcing/view.py b/sourcing/view.py index 1b16e79..b50d58e 100644 --- a/sourcing/view.py +++ b/sourcing/view.py @@ -199,6 +199,14 @@ def fulfil(username, hashid): item=item, doc=fulfil_edl_with_sources(item.text)) +@bp.route('///add_title', methods=['POST']) +def add_title(username, hashid): + item = get_item(username, hashid) + title = request.form['title'] + item.add_title(title, current_user) + flash('title added') + return redirect(item.url) + @bp.route('//') def view_item(username, hashid, raw=False): if ',' in hashid: