add title method

This commit is contained in:
Edward Betts 2017-06-07 13:30:56 +01:00
parent 4897d0a7d6
commit 95c196076b

View file

@ -199,6 +199,14 @@ def fulfil(username, hashid):
item=item,
doc=fulfil_edl_with_sources(item.text))
@bp.route('/<username>/<hashid>/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('/<username>/<hashid>')
def view_item(username, hashid, raw=False):
if ',' in hashid: