示例#1
0
def delete_product(id):
    deleted = Products.delete_by_id(id)
    if deleted:
        flash('Product successfully deleted', 'success')
        return redirect(url_for('products_reports'))
    else:
        flash('product not found', 'danger')
        return redirect(url_for('products_reports'))
示例#2
0
def delete(id):
    deleted = Products.delete_by_id(id)
    if deleted:
        flash("Deleted Succesfully", 'success')
        return redirect(url_for('products_all'))
    else:
        flash("Record not found", 'danger')
        return redirect(url_for('products_all'))