@home.route('/close', methods=['GET', 'POST'])
@login_required
def close():
    current_document = current_user.get_filename()
    if current_document:
        current_user.set_filename(None)
        flash(f'Closed {current_document}')
    else:
        flash('There was no package open')
    set_current_page('')
    return render_template('index.html')
@home.route('/close', methods=['GET', 'POST'])
@login_required
def close():
    current_document = current_user.get_filename()
    if current_document:
        current_user.set_filename(None)
        flash(f'Closed {current_document}')
    else:
        flash('There was no package open')
    set_current_page()
    return render_template('index.html')