コード例 #1
0
def delete_foods_bluepot():
    if request.method == 'POST':
        delete_bluepot = mongo.db.bluepotdrinks

        delete_bluepot.delete_one({'title': request.form.get('title')})

        return redirect(url_for('foods_bluepot'))

    form = deletefoodsForm()
    return render_template('delete_foods_bluepot.html', form=form)
コード例 #2
0
def delete_foods_gaonnuri():
    if request.method == 'POST':
        delete_gaonnuri = mongo.db.gaonnurifoods

        delete_gaonnuri.delete_one({'title': request.form.get('title')})

        return redirect(url_for('foods_gaonnuri'))

    form = deletefoodsForm()
    return render_template('delete_foods_gaonnuri.html', form=form)
コード例 #3
0
def delete_foods_namsan():
    if request.method == 'POST':
        delete_namsan = mongo.db.namsanfoods

        delete_namsan.delete_one({'title': request.form.get('title')})

        return redirect(url_for('foods_namsan'))

    form = deletefoodsForm()
    return render_template('delete_foods_namsan.html', form=form)
コード例 #4
0
def delete_foods_pandorothy():
    if request.method == 'POST':
        delete_pandorothy = mongo.db.pandorothyfoods

        delete_pandorothy.delete_one({'title': request.form.get('title')})

        return redirect(url_for('foods_pandorothy'))

    form = deletefoodsForm()
    return render_template('delete_foods_pandorothy.html', form=form)
コード例 #5
0
def delete_foods():
    if request.method == 'POST':
        delete_sangrok = mongo.db.sangrokonefoods

        delete_sangrok.delete_one({'title': request.form.get('title')})

        return redirect(url_for('foods'))

    form = deletefoodsForm()
    return render_template('delete_foods.html', form=form)