コード例 #1
0
def startlist_one_rename():
    startlist_id = request.form['startlist_select']

    # for startlist_one_edit_save()
    session['startlist_id'] = startlist_id

    # get the startlist name
    # render form to enter its new name

    startlist_name = StartlistNameModel.get_name_by_id(startlist_id)

    return render_template('startlist/startlist_one_rename.html',
                           startlist_name=startlist_name)
コード例 #2
0
def startlist_one_delete():
    startlist_id = request.form['startlist_select']

    startlist_name = StartlistNameModel.get_name_by_id(startlist_id)

    deleted = startlist_processing.delete_startlist_by_id(startlist_id)

    startlist_all = [(stlist.id, stlist.name)
                     for stlist in StartlistNameModel.list_all()]

    if deleted:
        return render_template(
            'startlist/startlist_one_menu_delete_success.html',
            data=startlist_all,
            startlist_name=startlist_name)
    return render_template('startlist/startlist_one_menu_delete_fail.html',
                           data=startlist_all,
                           startlist_name=startlist_name)